+ Reply to Thread
Results 1 to 5 of 5

Selecting a specific empty cell of a column

  1. #1
    Registered User
    Join Date
    06-11-2012
    Location
    Athens
    MS-Off Ver
    Excel 2007
    Posts
    6

    Selecting a specific empty cell of a column

    I've got a column (B) where my macro stores data. The first cell of this column (B1) should be empty and B2 contains the title. Data are written from B3 to Unknown (depends on number of execution). I d like this macro to check the position of the selected cell and return it to the next empty cell of the column B before it runs. For Example, if data are written to B3:B7 it should select B8 before it is run, in case another cell was selected accidentally or B3 if nothing was written.

  2. #2
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    Re: Selecting a specific empty cell of a column

    the following code will position Excel to the first empty cell in column B
    Please Login or Register  to view this content.
    Pierre Leclerc
    _______________________________________________________

    If you like the help you got,
    Click on the STAR "Add reputation" icon at the bottom.

  3. #3
    Registered User
    Join Date
    06-11-2012
    Location
    Athens
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Selecting a specific empty cell of a column

    Is there a way to position Excel to the second empty cell of the column if column B is not selected?

  4. #4
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    Re: Selecting a specific empty cell of a column

    the code I supplied works no matter which column is selected.
    If you want to select second empty cell, change the 1 in the Offset part of the code to 2. The first part of the code is to locate the last NON-EMPTY cell in column B. You make an offset to select the cell you want.

  5. #5
    Registered User
    Join Date
    06-11-2012
    Location
    Athens
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Selecting a specific empty cell of a column

    Thank you very much for your reply and your patience.

+ 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