+ Reply to Thread
Results 1 to 7 of 7

Locating the first empty cell in highlighted section

  1. #1
    Registered User
    Join Date
    12-10-2009
    Location
    Brodhead, WI
    MS-Off Ver
    Excel 2003
    Posts
    4

    Locating the first empty cell in highlighted section

    Can someone please give me a macro to highlight the cells Range("A4:S35") and find the first empty cell in that selection while keeping the Range highlighted.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Locating the first empty cell in highlighted section

    Do you mean something like the below ?

    Please Login or Register  to view this content.
    handler required in case there are no blanks

    (note: moved to parent Programming Forum (VBA))

  3. #3
    Registered User
    Join Date
    12-10-2009
    Location
    Brodhead, WI
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Locating the first empty cell in highlighted section

    That gives me the next blank column. Is there anyway i can get the next empty cell going form top to bottom of the page in the highlighted area? Could i just have the cursor on the empty cell and no message box. Sorry i wasnt more clear. Thank you very much

  4. #4
    Forum Expert
    Join Date
    01-03-2006
    Location
    Waikato, New Zealand
    MS-Off Ver
    2010 @ work & 2007 @ home
    Posts
    2,243

    Re: Locating the first empty cell in highlighted section

    hi,

    Welcome to the Forum

    Here's a slight adaptation of DonkeyOte's suggestion...
    Please Login or Register  to view this content.
    hth
    Rob
    Rob Brockett
    Kiwi in the UK
    Always learning & the best way to learn is to experience...

  5. #5
    Registered User
    Join Date
    12-10-2009
    Location
    Brodhead, WI
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Locating the first empty cell in highlighted section

    This will be perfect if you could have the cursor land on the first empty cell. It is still starting on the top of the next column

  6. #6
    Registered User
    Join Date
    12-10-2009
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    34

    Re: Locating the first empty cell in highlighted section

    same principle just loops through the columns rather than the entire range at once:

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    12-10-2009
    Location
    Brodhead, WI
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Locating the first empty cell in highlighted section

    Exactly what i wanted. Thank you very much

+ 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