Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
uberathlete
 
Posts: n/a
Default 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

  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default 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



  #3   Report Post  
uberathlete
 
Posts: n/a
Default 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

  #4   Report Post  
Bob Phillips
 
Posts: n/a
Default 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



  #5   Report Post  
uberathlete
 
Posts: n/a
Default 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



  #6   Report Post  
Dave Peterson
 
Posts: n/a
Default 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
  #7   Report Post  
uberathlete
 
Posts: n/a
Default 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

  #8   Report Post  
Bob Phillips
 
Posts: n/a
Default 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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Setting Purely BLANK Cell yokato95 Excel Worksheet Functions 4 August 18th 05 04:43 PM
Replace null string with blank cell gjcase Excel Discussion (Misc queries) 2 August 9th 05 02:13 PM
Look for change next blank cell in Range Nigel Bennett Excel Worksheet Functions 1 March 13th 05 10:45 PM
AutoFIll -by dragging the bottom-right corner of the cell Venkatesh V Excel Discussion (Misc queries) 5 February 23rd 05 05:57 PM
How do I autofill combo boxes with their destination cell? Defoes Right Boot Excel Worksheet Functions 3 January 10th 05 01:49 PM


All times are GMT +1. The time now is 12:16 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"