I have a 67 line record with heading data in the 2nd and 3rd rows, then I need to extract columns 4 & 5 from the next 65 lines skiping over 4 that contain headers. I have written the routine, and the code executes correctly for the first record, and then stops. I am using the following code:
Sub excelextract()
Application.ScreenUpdating = False
Sheets("Assessments").Select
Range("a1").Select
ActiveCell.SpecialCells(xlLastCell).Select
ans = ActiveCell.Row: nitems = ans / 67
clssheet1
For i = 2 To ans Step 67
Sheets("Assessments").Select
'Collecting Offering Information
oname = Cells(i, 1).Value
otname = Cells(i, 2).Value
ccode = Cells(i, 3).Value
ddname = Cells(i, 4).Value
urlname = Cells(i, 5).Value
aname = Cells(i + 1, 2).Value
aid = Cells(i + 1, 3).Value
pname = Cells(i + 1, 4).Value
extra = Cells(i + 1, 5).Value
125 variables later, I have a Next, but it gets ignored. When I debug, the value of ans =2210 and the correct values are in all variables, but it does not increment.
Any suggestions?
