+ Reply to Thread
Results 1 to 7 of 7

Find the first blank cell

  1. #1
    Registered User
    Join Date
    08-11-2010
    Location
    Foster City,CA
    MS-Off Ver
    Excel 2007
    Posts
    3

    Find the first blank cell

    Hi All,

    Need a macro to find the first blank/empty cell in a row.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Find the first blank cell

    This one line of code will find/select the first empty cell in row 25:
    Please Login or Register  to view this content.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    08-11-2010
    Location
    Foster City,CA
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Find the first blank cell

    thanks,
    but what if there are an infinite number of rows and what to find the first empy row. Basically I want to find the first available blank row.

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Find the first blank cell

    Excel doesn't support an infinite number of rows.

    Please Login or Register  to view this content.
    Entia non sunt multiplicanda sine necessitate

  5. #5
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Find the first blank cell

    Maybe this
    Please Login or Register  to view this content.

    or as a function
    Please Login or Register  to view this content.

    Test the function so
    Please Login or Register  to view this content.

    Hope this helps
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

  6. #6
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Find the first blank cell

    My one liner:
    Please Login or Register  to view this content.


    Or:
    Please Login or Register  to view this content.

  7. #7
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Find the first blank cell

    I must be reading this thread incorrectly....

    Both shg and JB have provided code that seems to find effectively this
    Please Login or Register  to view this content.
    I know the above can be unreliable, sometimes UsedRange can be larger than expected.

    My reading is that you want to find the first empty row within the used range and if there isn't one return the end of the data plus one row.

    Basically I want to find the first available blank row.
    This is quite different to the title of your thread

    Am I wrong?
    Last edited by Marcol; 08-12-2010 at 06:12 AM.

+ 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