View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
keri keri is offline
external usenet poster
 
Posts: 74
Default Help with looping macro / goto

Thanks so much for helping. I now have this code;

For i = 1 To 26
Application.Goto Sheets("raw2").Range("car" & i), True
response = MsgBox("Is CAR" & "" & i & "data correct?", vbYesNo)
If response = vbNo Then
Worksheets("data").cells(i, 1).Value = "N"
MsgBox ("Please correct the data then resume checking")
Exit Sub

Else:
Worksheets("data").cells(i, 1).Value = "Y"
End If
Next i

The code works and places the Y and N values into column A on the data
sheet. I then inserted this code below the For i = 1 to 26;

If Sheets("data").Range("A" & i) = Y Then
End If
Next i
Else:

However this gives me errors. Is this the correct way to check the Y &
N values on the data sheet or am i doing something stupidly wrong?