+ Reply to Thread
Results 1 to 8 of 8

Solution: Excel VBA to find the Last Row of a Table

  1. #1
    Registered User
    Join Date
    12-04-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    8

    Solution: Excel VBA to find the Last Row of a Table

    I do NOT have a question, rather I am sharing this code in hopes it may help be an answer the next time someone trys to find a solution to the following:

    I did multiple searches on the internet to try and resolve "How to Find the Last Row of a Table", but none of the articles seemed to provide a usable solution. The closest answer did not provide the row but did provide the number of rows in the table. A portion of that code is in the code below.

    The following code will calculate a "table's" Header Row, it's First Row, it's Last Row and provide the count of the number of Rows in the table.

    My worksheet is named: LinkedLabeler and my table is named: dbo_LinkedLabeler

    Please Login or Register  to view this content.
    I hope someone finds the above useful.
    Last edited by ND_Pard; 03-01-2022 at 09:31 PM. Reason: A monitor said it MUST be edited.

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,531

    Re: Excel vba to find the Last Row of a Table

    Two issues:

    First you do not have a question in your post.

    Second:
    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however you need to include code tags around your code.

    Please take a moment to add the tags. Posting code between [code]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/code] tags makes your code much easier to read and copy for testing, and it also maintains VBA formatting.

    Please see Forum Rule #2 about code tags and adjust accordingly. Click on Edit to open your post, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here

    (Note: this change is not optional. No help to be offered until this moderation request has been fulfilled.)
    Jeff
    | | |·| |·| |·| |·| | |:| | |·| |·|
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,122

    Re: Solution: Excel VBA to find the Last Row of a Table

    Another Option...
    Please Login or Register  to view this content.
    Good Luck
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the star to left of post [Add Reputation]
    Also....add a comment if you like!!!!
    And remember...Mark Thread as Solved.
    Excel Forum Rocks!!!

  4. #4
    Registered User
    Join Date
    12-04-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Excel vba to find the Last Row of a Table

    Thanks sintek … wish I’d found ya earlier

  5. #5
    Forum Guru
    Join Date
    04-23-2012
    Location
    New Jersey, USA
    MS-Off Ver
    Excel 365
    Posts
    2,401

    Re: Solution: Excel VBA to find the Last Row of a Table

    You could also do it this way as well (little bit more compact)...
    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    10-27-2023
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    11

    Re: Solution: Excel VBA to find the Last Row of a Table

    In this Forum Rule #2, code tags are not working in my case.
    Thanks
    James

  7. #7
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,917

    Re: Solution: Excel VBA to find the Last Row of a Table

    Have you tried to enter your code normally, then highlight and use the # symbol (directly above where you type)?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    79,342

    Re: Solution: Excel VBA to find the Last Row of a Table

    Quote Originally Posted by jamesmillere View Post
    In this Forum Rule #2, code tags are not working in my case.
    I've had to correct them for you because you added HTML tags, NOT code tags.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

+ 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. Find records in an Access table that no longer exists in an Excel table
    By KrenVT in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-23-2021, 04:33 PM
  2. Problems exporting a table - find/replace data inside a table in word through excel vba
    By elvagonumero1 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-28-2018, 04:33 PM
  3. Find the first blank row in an Excel Table
    By aquixano in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-21-2018, 10:58 PM
  4. [SOLVED] Excel Table: find sum of databodyrange
    By snapfade in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 02-08-2017, 07:20 PM
  5. [SOLVED] VBA to Find Duplicates in Each Column in an Excel Table
    By pinebush in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 02-07-2016, 01:00 AM
  6. [SOLVED] Unable to find last row in excel table
    By kevivu in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-02-2015, 06:36 AM
  7. Excel - Find a value in a Table !!??!!
    By herve in forum Excel General
    Replies: 4
    Last Post: 09-16-2005, 09:05 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