+ Reply to Thread
Results 1 to 8 of 8

Using XLDown in a loop to find next blank in a column

  1. #1
    Registered User
    Join Date
    04-11-2013
    Location
    Midlands,UK
    MS-Off Ver
    Excel 2007
    Posts
    17

    Using XLDown in a loop to find next blank in a column

    Hi

    DILIPandey kindly helped me out the other day, writing the below code, which does what it needs to do in my new report. However I was wondering if it could modified slightly so that it skips to the next blank using XL down somehow, rather than evaluating every cell?

    I've turned off the ScreenUpdating for my report and it's not very big anyway. I just wonder if I tried it with something bigger, the loop would take a while.


    I tried modifying it at the ActiveCell.Offset(1, 0).Select part but it jumped down to the bottom, skipping blank cells in column B, so I assume it was refering to the I formula.

    thanks

    Please Login or Register  to view this content.

  2. #2
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Using XLDown in a loop to find next blank in a column

    perhaps
    Please Login or Register  to view this content.
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  3. #3
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Using XLDown in a loop to find next blank in a column

    If you want to put a formula in each blank cell of a column perhaps you could use SpecialCells.
    Please Login or Register  to view this content.
    The formula might need adjusted for this to work.
    If posting code please use code tags, see here.

  4. #4
    Registered User
    Join Date
    04-11-2013
    Location
    Midlands,UK
    MS-Off Ver
    Excel 2007
    Posts
    17

    Re: Using XLDown in a loop to find next blank in a column

    Hi JosephP I tried your code but it came up with 'Run Time error '1004' No cells were found. Needs a tweak somewhere.

    Norie, I am about to leave work so I can't try your solution, but would that work for as long there is something in column A?

    Please Login or Register  to view this content.

  5. #5
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Using XLDown in a loop to find next blank in a column

    Jimmy

    If Joseph's code doesn't work then mine won't either, for the same reason.

    Are there actually blank cells in column B, not formulas that return "" or similar.

  6. #6
    Registered User
    Join Date
    04-11-2013
    Location
    Midlands,UK
    MS-Off Ver
    Excel 2007
    Posts
    17

    Re: Using XLDown in a loop to find next blank in a column

    Hi

    No formulas etc in the cells, checked format set to general etc. thanks

  7. #7
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Using XLDown in a loop to find next blank in a column

    Can you upload an example workbook?

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic

  8. #8
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Using XLDown in a loop to find next blank in a column

    well they're not blank as far as excel is concerned-perhaps you pasted them from somewhere? perhaps
    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