Re: Code bombs out at If-End if
Thanks all -
I changed the For - Next as follows
Code
For Each C In Range("A1:A" & lngRows)
If IsEmpty(C) Then 'Some rows in col are empty some are not
If myValue = 0 Then 'If cell is empty and myvalue is 0 do nothing
C = ""
Else
C.Value = myValue 'Otherwise assign myValue to ActiveCell
End If
Else
myValue = C.Value 'If new value assign to myValue
End If
Next C
Display More
I receive a type mismatch error here:
Barry - VBE added the ":" automatically when I typed
I did think I needed some line continuation characters
to break the IF-Then-Else-EndIf.
I will remember for the future
Thanks
-marc