D
Dave
Hi Guys,
I'm trying to write in to a macro the ability to Autofill a column from a
cell (H7) to LastRow as you can see below, but miss out rows that have no
value in Column D.
E.g.
If
LastRow is 20
D7 has value? Yes. Fill Row.
D8 has value? Yes. Fill Row.
D9 has value? No. Skip Row.
D10 has value? Yes. Fill Row.........
Code:
Dim lastRow As Long
lastRow = Range("A65536").End(xlUp).row
Range("H7:H7").Select
Selection.AutoFill Destination:=Range("H2:H" & lastRow)
Can anyone help with this?
Thanks
Dave
I'm trying to write in to a macro the ability to Autofill a column from a
cell (H7) to LastRow as you can see below, but miss out rows that have no
value in Column D.
E.g.
If
LastRow is 20
D7 has value? Yes. Fill Row.
D8 has value? Yes. Fill Row.
D9 has value? No. Skip Row.
D10 has value? Yes. Fill Row.........
Code:
Dim lastRow As Long
lastRow = Range("A65536").End(xlUp).row
Range("H7:H7").Select
Selection.AutoFill Destination:=Range("H2:H" & lastRow)
Can anyone help with this?
Thanks
Dave