+ Reply to Thread
Results 1 to 8 of 8

Run a function until it finds a blank cell

  1. #1
    Registered User
    Join Date
    07-24-2012
    Location
    burlington WA
    MS-Off Ver
    Excel 2010
    Posts
    54

    Run a function until it finds a blank cell

    I have a column with a function in the top row. I want VBA to read that function and copy it down to the next cell as long as there is something in the cell 5 columns to the left.
    Any suggestions? Here is the function I need copied down. =VLOOKUP(Q5,References!$B$2:$C$70,2,0)

  2. #2
    Forum Expert DGagnon's Avatar
    Join Date
    02-23-2012
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2003, 2007
    Posts
    1,645

    Re: Run a function until it finds a blank cell

    you could use something like this

    Please Login or Register  to view this content.
    If you liked my solution, please click on the Star -- to add to my reputation

    If your issue as been resolved, please clearly state so and mark the thread as [SOLVED] using the thread tools just above the first post.

  3. #3
    Registered User
    Join Date
    07-24-2012
    Location
    burlington WA
    MS-Off Ver
    Excel 2010
    Posts
    54

    Re: Run a function until it finds a blank cell

    So you are saying that I need to specify 3 different rows? What about the columns?

  4. #4
    Forum Expert DGagnon's Avatar
    Join Date
    02-23-2012
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2003, 2007
    Posts
    1,645

    Re: Run a function until it finds a blank cell

    sorry in my second 2 comments it should be column, not row, typo see bellow:

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    07-24-2012
    Location
    burlington WA
    MS-Off Ver
    Excel 2010
    Posts
    54

    Re: Run a function until it finds a blank cell

    Sheesh! I cant get anything to work right. Im trying to modify someone elses code and I am unfamiliar with it. This is what he had but it skips every other row. I tried yours but I must be doing something wrong because it wont work right.
    Please Login or Register  to view this content.

  6. #6
    Forum Expert DGagnon's Avatar
    Join Date
    02-23-2012
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2003, 2007
    Posts
    1,645

    Re: Run a function until it finds a blank cell

    If you can answer these 3, i can modify the code for you

    -what column do you want the formula in?
    -what column do you want to check to make sure is populated?
    -what row do you want to start on?

  7. #7
    Registered User
    Join Date
    07-24-2012
    Location
    burlington WA
    MS-Off Ver
    Excel 2010
    Posts
    54

    Re: Run a function until it finds a blank cell

    AV is the column that needs formulas copied down
    Check Column C to see if it is populated
    Start on row 3

  8. #8
    Forum Expert DGagnon's Avatar
    Join Date
    02-23-2012
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2003, 2007
    Posts
    1,645

    Re: Run a function until it finds a blank cell

    Try this

    Please Login or Register  to view this content.

+ 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