I have some code that I am trying to get to run. Logically this is what I want it to do:
For gdprnum = 1 To 150
gdpcarline = ActiveSheet.Cells(gdprnum, 1).Value
if volumcarline = gdpcarline Then
Workbooks("NEW 04_FCST-May.xls").Activate
Worksheets("Volume Summary by PCBS").Activate
xcorrect = ActiveSheet.Cells(forrnum, cnum).Value
exit for
Else
Next gdprnum
End If
Next gdprnum
However, that is not working correctly. I keep getting an error saying thatmy first next gdprnum is without a for.
any suggestions?
For gdprnum = 1 To 150
gdpcarline = ActiveSheet.Cells(gdprnum, 1).Value
if volumcarline = gdpcarline Then
Workbooks("NEW 04_FCST-May.xls").Activate
Worksheets("Volume Summary by PCBS").Activate
xcorrect = ActiveSheet.Cells(forrnum, cnum).Value
exit for
Else
Next gdprnum
End If
Next gdprnum
However, that is not working correctly. I keep getting an error saying thatmy first next gdprnum is without a for.
any suggestions?