Autofill until blank cell is reached

U

uberathlete

Hi all! I've got Sheet 1 (see attached). Let's say I've got a formula
(assume a VLOOKUP formula) in B2 and I want to autofill down to the
other cells in the B column until a blank column is reached in the A
column. Does anyone know how I can make a macro for this? Any help
would be greatly appreciated. Thanks!


+-------------------------------------------------------------------+
|Filename: Sheet1.JPG |
|Download: http://www.excelforum.com/attachment.php?postid=3994 |
+-------------------------------------------------------------------+
 
U

uberathlete

Whoops, my bad. I tried it again and it works. Only problem is that the
blank cells in the B column which have no "match" or value in the A
column all fill up with 0.
 
D

Dave Peterson

Maybe using column A would work better:

Range("B2").Autofill Range("B2").Resize(Range("A2").End(xlDown).Row-1)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Autofill until blank cell is reached 3
Conditional Autofill 1
Autofill Until 1
Autofill until 1
Conditional Autofill 4
Difference from highest in unsorted column 3
Blank rows 2
Autofill Until 4

Top