+ Reply to Thread
Results 1 to 9 of 9

Determining if next cell is empty

  1. #1
    Registered User
    Join Date
    03-30-2007
    Posts
    72

    Determining if next cell is empty

    What is the code for determining if the next cell in a given column is empty from within VB?

  2. #2
    Forum Expert
    Join Date
    12-29-2004
    Location
    Michigan, USA
    MS-Off Ver
    2013
    Posts
    2,208
    Do you mean the cell below the current (active) cell? If so, this will tell you:
    Please Login or Register  to view this content.
    HTH

    Jason

  3. #3
    Registered User
    Join Date
    03-30-2007
    Posts
    72
    Quote Originally Posted by jasoncw
    Do you mean the cell below the current (active) cell? If so, this will tell you:
    Please Login or Register  to view this content.
    HTH

    Jason
    What i mean is that if i have a column with values from A1:A30 and A31 is empty then i would like to identify that and perform some calculations at that point. Will the above code do that? Sorry i'm very new to VB.

  4. #4
    Forum Expert
    Join Date
    12-29-2004
    Location
    Michigan, USA
    MS-Off Ver
    2013
    Posts
    2,208
    In your example, this will tell you the next empty cell in a column:
    Please Login or Register  to view this content.
    You can either activate this cell, or determine the address, or various other coding with this information:
    Please Login or Register  to view this content.
    HTH

    Jason

  5. #5
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,486
    this will take you to the next empty cell
    Please Login or Register  to view this content.
    ot this

    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    03-30-2007
    Posts
    72
    Quote Originally Posted by jasoncw
    In your example, this will tell you the next empty cell in a column:
    Please Login or Register  to view this content.
    You can either activate this cell, or determine the address, or various other coding with this information:
    Please Login or Register  to view this content.
    HTH

    Jason
    Determining the Address is most likely what i need. Now my question is in which format will the address be returned. I assume is AX. If so how do i get rid of the letter and only keep the number of the row for further calculations?

  7. #7
    Forum Expert
    Join Date
    12-29-2004
    Location
    Michigan, USA
    MS-Off Ver
    2013
    Posts
    2,208
    If the first blank cell is A10, it will return $A$10. If you want just the row number, you can use:
    Please Login or Register  to view this content.
    Jason

  8. #8
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,486
    Quote Originally Posted by SER01
    Determining the Address is most likely what i need. Now my question is in which format will the address be returned. I assume is AX. If so how do i get rid of the letter and only keep the number of the row for further calculations?
    You may need to tell us what are you trying to do in order for us to help..

  9. #9
    Forum Expert
    Join Date
    12-10-2006
    Location
    Sydney
    MS-Off Ver
    Office 365
    Posts
    3,527
    I'll throw my hat into the ring and say that SER01 is trying to sum a dynamic number of entries in Column A starting at cell A1.

    If that is the case, he/she can use the following:

    Please Login or Register  to view this content.
    HTH

    Robert

+ 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