Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Fill in Data

277 views
Skip to first unread message

snax...@my-deja.com

unread,
Dec 14, 1999, 3:00:00 AM12/14/99
to
I have the following macro that fills in data from the row above if
empty. It works great but I would like to copy the data only, not the
formats. How do I adjust this?

Dim cell
For Each cell In Selection
If cell = "" Then
cell.FillDown
End If
Next cell

Thanks


Sent via Deja.com http://www.deja.com/
Before you buy.

Tom Ogilvy

unread,
Dec 14, 1999, 3:00:00 AM12/14/99
to
Dim cell as range

For Each cell In Selection
If cell = "" Then
cell.Value = cell.offset(-1,0).Value
End If
Next cell

or
Dim cell as range


For Each cell In Selection
If cell = "" Then

cell.Value = cell(0).value
End If
Next cell

If you meant formulas as well, then change value in the above to formula

Regards,
Tom Ogilvy


snax...@my-deja.com wrote in message <835lv6$562$1...@nnrp1.deja.com>...

0 new messages