Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel to Extra Copy First 15 then enter and continue

Status
Not open for further replies.

bigdubbe

Programmer
May 26, 2006
11
US
I am having trouble finding a way to copy the first 15 entries from a excel document, and enter them into extra on the 15 avaiable entry lines then pressing enter to submit them and then pick up back on line 16 in the excel spreadsheet to continue entering in 15 at a time till there are none left.

I have no problem enter them one at a time and submitting, but due to the volume it takes forever like this. Entering 15 at a time and submitting it like that would save alot of time.
 
Code:
iExtraStart = 2
iExcelStart = 5
iCnt = 0
iExcelRow = iStartRow + iCnt
While Cells(iExcelRow, 1) <> ""
    iExtraRow = iExtraStart + (iCnt Mod 15)
    iExcelRow = iExcelStart + iCnt
    PutString Cells(iExcelRow, 1).Value, iExtraRow, 1
    iCnt = iCnt + 1
    If iCnt Mod 15 = 0 Then
        SubmitData
    End If
Wend

This is pseudo code. But, it should point you in the right direction. It's more variables than I would use, but hopefully the additional variables will help it make sense.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top