+ Reply to Thread
Results 1 to 4 of 4

Macro to select cell after last row in column

Hybrid View

robertguy Macro to select cell after... 09-10-2009, 10:17 AM
DonkeyOte Re: Macro to select cell... 09-10-2009, 10:18 AM
jasocke2 Re: Macro to select cell... 09-10-2009, 10:24 AM
robertguy Re: Macro to select cell... 09-10-2009, 10:52 AM
  1. #1
    Forum Contributor
    Join Date
    02-09-2004
    Location
    Cardiff - Wales - UK
    MS-Off Ver
    2013
    Posts
    475

    Question Macro to select cell after last row in column

    Hi,

    Can any tell me the macro code to select the cell after the bottom of a column of data e.g. I have data in A1:A300 and I require the macro to automatically calculate the last row in the range (in this case A300) and then to select A301 (in this case)

    (I know I can record a macro but the number of rows can potentially differ every time I run the macro)

    Many thanks in advance

    Regards Rob

    N.B. Excel version 2003
    Last edited by robertguy; 09-21-2009 at 05:42 AM. Reason: To mark resloved
    Rob

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

    Re: Macro to select cell after last row in column

    Work from the bottom up...

    Cells(Rows.Count,"A").End(xlUp).Offset(1)
    (add .Row if you want/need the row number...)

  3. #3
    Registered User
    Join Date
    08-20-2009
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    45

    Re: Macro to select cell after last row in column

    Hi.

    This is one possible way of selecting the next available cell in column A:

    Sub Selectnextcell()
    Cells(Cells(Rows.Count, "A").End(xlUp).Row + 1, "A").Select
    End Sub

  4. #4
    Forum Contributor
    Join Date
    02-09-2004
    Location
    Cardiff - Wales - UK
    MS-Off Ver
    2013
    Posts
    475

    Thumbs up Re: Macro to select cell after last row in column

    DonkeyOte & jasocke2,


    many thanks for your prompt replies they both worked as requested.


    Thanks again


    Rob

+ 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