Ok, try following:
Sub BlankRepeats()
dim ws as worksheet
set ws = worksheets("YourWorksheet")
For Each cell In ws.Range("A2:A35")
If cell.Value = "" Then
cell.Value = cell.Offset(-1, 0).Value
End If
Next cell
End Sub
As I said, I'm not sure if "cell" is reserved, I just like to avoid
stuff like that :)
hth
Carlo
> > the problem is, if A1 is empty, A2 will be filled by empty and so on!
>
[quoted text clipped - 51 lines]
>
> - Show quoted text -
Susan - 20 Dec 2007 05:11 GMT
> Ok, try following:
>
[quoted text clipped - 72 lines]
>
> > - Show quoted text -
Hi,
I hate to say its still not working. Using a debug point I stepped
through the code and I can see its iterating correctly, but it never
enters the if loop i.e. doesnt pick up the blanks.
I use 'cell' because I don't know any other way of iterating and
accessing cell values that works.
Please suggest any alternatives to using cell. Earlier you suggested
"try mycell
or cell_ as variable, to avoid problems." Please explain.
Thanks for your patience.
Susan