Quantcast
Channel: Excel Help Forum - Excel Programming / VBA / Macros
Viewing all articles
Browse latest Browse all 50139

Copy formula down to last row of previous column which has blank rows on top

$
0
0
Hello,

I would like to copy formulas in Column AX down to end of data in the previous column AW. Data in both columns start from row 9 and there are blank rows above that.

I used this code which does not work, I think, because it assumes the data in AW starts from row 1 (or am I wrong in my analysis?)

Code:

Dim LastRow As Long
    LastRow = Cells(Rows.Count, "AW").End(xlUp).Row
    Range("AX9").AutoFill Destination:=Range("AX9:AX" & LastRow)

Any suggestions on how this should work?? I need to copy the formula in AX9 down to end of data in column AW (starts from row 9)

Moderators Note: Please follow forum rules and use code tags. Added for you this time, but please use them in the future…Thanks.

Viewing all articles
Browse latest Browse all 50139

Trending Articles