+ Reply to Thread
Results 1 to 8 of 8

VBA to find Select next Empty Cell in Column C

  1. #1
    Forum Contributor
    Join Date
    03-17-2013
    Location
    London, England
    MS-Off Ver
    Microsoft 365 MSO (Version 2202 Build 16.0.14931.20648) 32-bit
    Posts
    152

    VBA to find Select next Empty Cell in Column C

    Hi all,

    I currently have this VBA for a Command Button in a userform..

    Please Login or Register  to view this content.
    I have tried to do it with the last line but it's not working, All I want the last line to do is Select first empty cell in Column C and make it the active cell.

    Please help

    Thanks in advance.

  2. #2
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: VBA to find Select next Empty Cell in Column C

    Worksheets("Tracker").Activate
    Worksheets("Tracker").Range("C" & Rows.Count).End(xlUp).Row+1

  3. #3
    Forum Contributor
    Join Date
    03-17-2013
    Location
    London, England
    MS-Off Ver
    Microsoft 365 MSO (Version 2202 Build 16.0.14931.20648) 32-bit
    Posts
    152

    Re: VBA to find Select next Empty Cell in Column C

    Thanks for this,

    Its really strange as when I add that in and press enter onto the next line, It removes the + and looks like this..

    Please Login or Register  to view this content.
    And gives me a debug error on that line.

    Any idea's?

  4. #4
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,519

    Re: VBA to find Select next Empty Cell in Column C

    What happens if you replace the "+ 1" with ".Offset(1)" (No quotes)

  5. #5
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,907

    Re: VBA to find Select next Empty Cell in Column C

    Please Login or Register  to view this content.
    Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
    You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.

  6. #6
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,758

    Re: VBA to find Select next Empty Cell in Column C

    As you have activated sheet "Tracker" you don't need it in line
    Please Login or Register  to view this content.
    and the expression "Range("C" & Rows.Count).End(xlUp).Row" will give you a number i.e. row number of first empty cell in column C going from the bottom and upwards.

    So if you wish to select first empty cell in column C try

    Please Login or Register  to view this content.
    and if you wish to find the row number of first empty cell in column C try:

    Please Login or Register  to view this content.
    Alf

  7. #7
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: VBA to find Select next Empty Cell in Column C

    Sorry! I lost my internet connection while trying to correct my error.

  8. #8
    Registered User
    Join Date
    11-21-2014
    Location
    bangladesh
    MS-Off Ver
    2013
    Posts
    33

    Re: VBA to find Select next Empty Cell in Column C

    Try this:

    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)

Similar Threads

  1. Select range until first empty cell in a column
    By Hadoushi in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-20-2015, 07:29 AM
  2. Replies: 5
    Last Post: 05-13-2014, 10:19 AM
  3. Need to find empty filled cells in a column and copy to the empty cell below
    By Grahamfeeley in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-30-2014, 10:09 AM
  4. find next empty cell in a row and select
    By dfelz in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 07-18-2013, 02:50 PM
  5. Select first empty cell and Fill down against next column in VBA
    By GuyHudson in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-22-2011, 11:46 AM
  6. Find and Select the Next Empty Cell in Column A
    By billykiller05 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-04-2009, 01:01 PM
  7. Replies: 1
    Last Post: 05-15-2006, 04:10 AM

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