+ Reply to Thread
Results 1 to 8 of 8

Autofill until blank cell is reached

  1. #1
    Forum Contributor
    Join Date
    10-27-2005
    Posts
    177

    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!
    Attached Images Attached Images

  2. #2
    Bob Phillips
    Guest

    Re: 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" <[email protected]>
    wrote in message
    news:[email protected]...
    >
    > 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. #3
    Forum Contributor
    Join Date
    10-27-2005
    Posts
    177

    re

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

  4. #4
    Bob Phillips
    Guest

    Re: 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" <[email protected]>
    wrote in message
    news:[email protected]...
    >
    > ^^ 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. #5
    Forum Contributor
    Join Date
    10-27-2005
    Posts
    177

    re

    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.

  6. #6
    Dave Peterson
    Guest

    Re: 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. #7
    Forum Contributor
    Join Date
    10-27-2005
    Posts
    177

    re

    Wicked! Thanks Bob!

  8. #8
    Bob Phillips
    Guest

    Re: 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" <[email protected]>
    wrote in message
    news:[email protected]...
    >
    > 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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1