J
Jan Kronsell
I have something like
For Each cel in Sheets("Mate").Range(A1:A10000).Cells
If IsEmpty(cel.Value) then Next cel
If ......
.....
End If
Next cel
This fails with a "Next without For" message.
To make it work I have changed the code to
For Each cel in Sheets("Mate").Range(A1:A10000).Cells
If IsEmpty(cel.Value) then GoTo MyLabel
If ......
.....
End If
MyLabel:
Next cel
But I wonder if it can be done, without the GoTo statement?
Jan
For Each cel in Sheets("Mate").Range(A1:A10000).Cells
If IsEmpty(cel.Value) then Next cel
If ......
.....
End If
Next cel
This fails with a "Next without For" message.
To make it work I have changed the code to
For Each cel in Sheets("Mate").Range(A1:A10000).Cells
If IsEmpty(cel.Value) then GoTo MyLabel
If ......
.....
End If
MyLabel:
Next cel
But I wonder if it can be done, without the GoTo statement?
Jan