+ Reply to Thread
Results 1 to 11 of 11

How to find the last row in a table ,from bottoms to the last cell

  1. #1
    Forum Contributor
    Join Date
    12-01-2022
    Location
    Rhodes,Greece
    MS-Off Ver
    office 2021
    Posts
    225

    How to find the last row in a table ,from bottoms to the last cell

    I know the code how to find the last row in a table. If for example I have a table and the the table starts from A5 (for example) the code will be...
    Range("A5").End(xlDown).Offset(1, 0).Select
    But if I have blank cells in the table ,running this code i will go at the first blank cell,and not at the bottom of the table.
    Is there a code that starts from the last cell of the bottom of excel and goes all the way up to the last cell of the table?
    Thank you in advance

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,942

    Re: How to find the last row in a table ,from bottoms to the last cell

    Try
    Please Login or Register  to view this content.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Contributor
    Join Date
    12-01-2022
    Location
    Rhodes,Greece
    MS-Off Ver
    office 2021
    Posts
    225

    Re: How to find the last row in a table ,from bottoms to the last cell

    it worked perfectly.thank you very much

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,942

    Re: How to find the last row in a table ,from bottoms to the last cell

    You're welcome. Thanks for the rep.

  5. #5
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Arrow Re: How to find the last row in a table ,from bottoms to the last cell


    Hello,

    as a reminder if it is a true Excel table then using a specific code to find the last row is useless at it is already embedded within the table …

  6. #6
    Forum Contributor
    Join Date
    12-01-2022
    Location
    Rhodes,Greece
    MS-Off Ver
    office 2021
    Posts
    225

    Re: How to find the last row in a table ,from bottoms to the last cell

    Quote Originally Posted by Marc L View Post

    Hello,

    as a reminder if it is a true Excel table then using a specific code to find the last row is useless at it is already embedded within the table …
    what do you mean by that?i already use this code with a button.
    is there an other way with the same results?

  7. #7
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Arrow Re: How to find the last row in a table ,from bottoms to the last cell


    As it depends on the missing answer to my previous post or just attach your workbook with your best elaboration …

  8. #8
    Forum Contributor
    Join Date
    12-01-2022
    Location
    Rhodes,Greece
    MS-Off Ver
    office 2021
    Posts
    225

    Re: How to find the last row in a table ,from bottoms to the last cell

    Quote Originally Posted by Marc L View Post

    As it depends on the missing answer to my previous post or just attach your workbook with your best elaboration …
    one of my workbooks that i am using it
    Attached Files Attached Files

  9. #9
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Arrow Re: How to find the last row in a table ,from bottoms to the last cell


    TMS' post #2 already answers whatever if the column has an Excel table or not …

    Anyway according to your attachment where you use two Excel tables then based on the Excel Objects Model
    this VBA procedure can replace your both procedures if associated to each 'LASTROW' button :
    Please Login or Register  to view this content.

  10. #10
    Forum Contributor
    Join Date
    12-01-2022
    Location
    Rhodes,Greece
    MS-Off Ver
    office 2021
    Posts
    225

    Re: How to find the last row in a table ,from bottoms to the last cell

    Quote Originally Posted by Marc L View Post

    TMS' post #2 already answers whatever if the column has an Excel table or not …

    Anyway according to your attachment where you use two Excel tables then based on the Excel Objects Model
    this VBA procedure can replace your both procedures if associated to each 'LASTROW' button :
    Please Login or Register  to view this content.
    Hallo from Greece. first of all thank you very much for all your effort. The code you gave me goes at the last row of the first table when i run it. i can see you are very expert .do you think is there a way to make my sheet pore productive?this is my inventory of my 2 shops

  11. #11
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Arrow Re: How to find the last row in a table ,from bottoms to the last cell


    Aloha !

    According to your attachment it depends on which button launches my VBA procedure.
    I can't tell anything about your worksheet, maybe TMS could …

+ 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. Replies: 2
    Last Post: 11-03-2020, 09:23 AM
  2. Help with VBA code to find bottom row in pivot table and fill table cell borders
    By Eric111 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-28-2014, 07:15 PM
  3. [SOLVED] Find a text in a cell (which is also in a table)
    By bebongtheshark in forum Excel General
    Replies: 5
    Last Post: 08-07-2013, 04:08 AM
  4. [SOLVED] Find last cell in active table
    By stubbsj in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-26-2012, 06:50 PM
  5. Find cell address within a table?
    By Sean Anderson in forum Excel Formulas & Functions
    Replies: 17
    Last Post: 09-02-2010, 01:41 PM
  6. Excel 2007 : Find row no. of cell from a table and more
    By chandras4uin in forum Excel General
    Replies: 0
    Last Post: 07-14-2010, 02:20 PM
  7. [SOLVED] Find a value in the table cell
    By Jiri in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-28-2006, 09:50 PM

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