+ Reply to Thread
Results 1 to 12 of 12

Select first table cell with data and offset

  1. #1
    Forum Contributor
    Join Date
    07-14-2019
    Location
    Dubai
    MS-Off Ver
    2019
    Posts
    921

    Select first table cell with data and offset

    Hey

    Within "Sheet1" "Table1"

    I want VBA code to select first cell with data from the bottom of the table in coulmn name "Number"
    Then offset one cell down

    Thanks
    Attached Files Attached Files
    Last edited by Undo; 08-30-2021 at 11:00 AM.

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

    Re: Select first table cell with data and offset

    If you are using the List Object correctly then this will take you 1 row below the actual Table...
    Unless you are making the common mistake of having lots and lots of blank rows within said Table...
    Attath sample file for accurate feedback...
    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!!!

  3. #3
    Forum Contributor
    Join Date
    07-14-2019
    Location
    Dubai
    MS-Off Ver
    2019
    Posts
    921

    Re: Select first table cell with data and offset

    yes I know this point, the code will be fine

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

    Re: Select first table cell with data and offset

    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    07-14-2019
    Location
    Dubai
    MS-Off Ver
    2019
    Posts
    921

    Re: Select first table cell with data and offset

    Thanks but the code didnt work like I ask
    It should stop in yellow cell
    explain again : column Number : calculate from bottom of the table > select first non blank cell ( F6 ) then go one cell down ( F7 )

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

    Re: Select first table cell with data and offset

    Yep classic error...why oh why the blank rows in table????

  7. #7
    Forum Contributor
    Join Date
    07-14-2019
    Location
    Dubai
    MS-Off Ver
    2019
    Posts
    921

    Re: Select first table cell with data and offset

    My working will be like that, table will be like that
    any other code to select same cell?

  8. #8
    Forum Contributor
    Join Date
    07-14-2019
    Location
    Dubai
    MS-Off Ver
    2019
    Posts
    921

    Re: Select first table cell with data and offset

    I am not a pro in coding but with this steps we can go?
    select last cell in table column Number
    then xlup,now we are in last nonblank cell, then offset one cell down

  9. #9
    Valued Forum Contributor
    Join Date
    02-02-2016
    Location
    Indonesia
    MS-Off Ver
    Office 365
    Posts
    1,009

    Re: Select first table cell with data and offset

    Try:
    Please Login or Register  to view this content.
    OR

    Please Login or Register  to view this content.

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

    Re: Select first table cell with data and offset

    Please Login or Register  to view this content.

  11. #11
    Forum Contributor
    Join Date
    07-14-2019
    Location
    Dubai
    MS-Off Ver
    2019
    Posts
    921

    Re: Select first table cell with data and offset

    Thanks All!

    sintek : Exactly!
    Akuini : Second code working!

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

    Re: Select first table cell with data and offset

    All good...tx for rep +

+ 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. [SOLVED] VBA to select table data based on Cell value
    By shiva_reshs in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-24-2021, 04:54 PM
  2. Replies: 11
    Last Post: 04-19-2021, 07:46 PM
  3. Select Cells with Data ONLY, Copy & Offset! <VBA>
    By arikoloshio in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 04-30-2013, 12:51 PM
  4. Select visible cell using Offset
    By praveen_khm in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-22-2011, 10:56 AM
  5. Re: Select last cell before blank, then offset
    By bryant_16 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-19-2009, 07:51 AM
  6. Select last cell before blank, then offset
    By jeff.p in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-04-2007, 06:43 PM
  7. Using offset to select next empty cell
    By NewExcelUser in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-02-2007, 06:32 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