ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Autofill until blank cell is reached (https://www.excelbanter.com/excel-discussion-misc-queries/53746-autofill-until-blank-cell-reached.html)

uberathlete

Autofill until blank cell is reached
 

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 |
+-------------------------------------------------------------------+

--
uberathlete
------------------------------------------------------------------------
uberathlete's Profile: http://www.excelforum.com/member.php...o&userid=28388
View this thread: http://www.excelforum.com/showthread...hreadid=482220


Bob Phillips

Autofill until blank cell is reached
 

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

--

HTH

RP
(remove nothere from the email address if mailing direct)


"uberathlete"
wrote in message
...

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 |
+-------------------------------------------------------------------+

--
uberathlete
------------------------------------------------------------------------
uberathlete's Profile:

http://www.excelforum.com/member.php...o&userid=28388
View this thread: http://www.excelforum.com/showthread...hreadid=482220




uberathlete

Autofill until blank cell is reached
 

^^ Thanks! I tried it but it doesn't seem to work :(


--
uberathlete
------------------------------------------------------------------------
uberathlete's Profile: http://www.excelforum.com/member.php...o&userid=28388
View this thread: http://www.excelforum.com/showthread...hreadid=482220


Bob Phillips

Autofill until blank cell is reached
 
It works for me. What do you get?

--

HTH

RP
(remove nothere from the email address if mailing direct)


"uberathlete"
wrote in message
...

^^ Thanks! I tried it but it doesn't seem to work :(


--
uberathlete
------------------------------------------------------------------------
uberathlete's Profile:

http://www.excelforum.com/member.php...o&userid=28388
View this thread: http://www.excelforum.com/showthread...hreadid=482220




uberathlete

Autofill until blank cell is reached
 

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.


--
uberathlete
------------------------------------------------------------------------
uberathlete's Profile: http://www.excelforum.com/member.php...o&userid=28388
View this thread: http://www.excelforum.com/showthread...hreadid=482220


Dave Peterson

Autofill until blank cell is reached
 
Maybe using column A would work better:

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



uberathlete wrote:

^^ Thanks! I tried it but it doesn't seem to work :(

--
uberathlete
------------------------------------------------------------------------
uberathlete's Profile: http://www.excelforum.com/member.php...o&userid=28388
View this thread: http://www.excelforum.com/showthread...hreadid=482220


--

Dave Peterson

uberathlete

Autofill until blank cell is reached
 

Wicked! Thanks Bob!


--
uberathlete
------------------------------------------------------------------------
uberathlete's Profile: http://www.excelforum.com/member.php...o&userid=28388
View this thread: http://www.excelforum.com/showthread...hreadid=482220


Bob Phillips

Autofill until blank cell is reached
 
Change your formula to test fro 0 and output "".

--

HTH

RP
(remove nothere from the email address if mailing direct)


"uberathlete"
wrote in message
...

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.


--
uberathlete
------------------------------------------------------------------------
uberathlete's Profile:

http://www.excelforum.com/member.php...o&userid=28388
View this thread: http://www.excelforum.com/showthread...hreadid=482220





All times are GMT +1. The time now is 09:48 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com