Thread: Compile error
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ivan Raiminius Ivan Raiminius is offline
external usenet poster
 
Posts: 258
Default Compile error

Hi Eje,

For r = 2 To 50
For c = 4 To 50

If Cells(r, 4) = "" Then Cells(r, 2) = 0
If Cells(r, c) 0 And Cells(r, c + 1) = "" Then Cells(r, 2) = c - 3
Next
Next

or

For r = 2 To 50
For c = 4 To 50

If Cells(r, 4) = "" Then
Cells(r, 2) = 0
End If

If Cells(r, c) 0 And Cells(r, c + 1) = "" Then
Cells(r, 2) = c - 3
End If
Next
Next

Regards,
Ivan