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

Autofill code error

$
0
0
I have code that autofills B9:B if there is corresponding data in column A. It works fine when there is more than one row of data in the file. However it fails if column A only has one cell populated in a single row. Is there a way to fix my code so it will not fail in my scenario above?

Range("B9").AutoFill Destination:=Range("B9:B" & Cells(Rows.Count, "A").End(xlUp).row)


Thanks,
Steve

Viewing all articles
Browse latest Browse all 50139

Trending Articles