+ Reply to Thread
Results 1 to 4 of 4

Using a Find with a Table

  1. #1
    Forum Contributor
    Join Date
    03-05-2007
    Location
    Falmouth, VA now, Palm Bay, FL for 2 yrs, was Colorado Springs, CO for ten years; Cedark Park, TX; Zeeland, MI; Wilmette, IL; Princeton Junction, NJ; NY, NY
    MS-Off Ver
    365
    Posts
    583

    Using a Find with a Table

    In setting up to find a string within a column of a table using the Find function, I would like the search to start right after the header row, which cell would be therefore referenced after the expression After:= (or in proper order). How do I properly reference a specific cell in the header row without using A1 notation? I want to do this for if I move the table or delete a row above it or column before it, I'd rather not have another nightmare on my hands...

    Thank-you!!!

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Using a Find with a Table

    Hello brucemc777,

    A Table in Excel is a ListObject in VBA. You can reference the Table by it's name in the ListObjects collection. It is not necessary to know where it is on the worksheet because there a several properties that return Range objects from the Table.

    ListObject Ranges
    1. DataBodyRange = Cells below the header down to the row above Insertion row.
    2. HeaderRow = Cells in the top row of the table.
    3. InsertRowRange = The last row of the Table. This is a special row used to insert new rows into the table.
    4. TotalsRowRange = The cells at the bottom of the Table used for the totals. This is only visible when the .ShowTotals property is set to True.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,168

    Re: Using a Find with a Table

    Hi bruce,

    It sounds like you need a "Named Range" somewhere in your formulas. Instead of doing a cell ref like A1:D27 you can name that range and the name will stick with the range if/when you move it around. If the range grows or shrinks then you need Dynamic Named Ranges. Read:

    http://www.bettersolutions.com/excel...G820716330.htm
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  4. #4
    Forum Contributor
    Join Date
    03-05-2007
    Location
    Falmouth, VA now, Palm Bay, FL for 2 yrs, was Colorado Springs, CO for ten years; Cedark Park, TX; Zeeland, MI; Wilmette, IL; Princeton Junction, NJ; NY, NY
    MS-Off Ver
    365
    Posts
    583

    Re: Using a Find with a Table

    Thank-you folks - I learned from both of the posts! I found the solution that seems to work is simply to set my start of search after:

    Please Login or Register  to view this content.
    Which I will probably either assign or set to a variable.

    Where hopefully obvious the worksheet is named dbImport and the table is named tblImport...

    Once again, I appreciate the information!!!

+ 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] Find First and Last value in a table
    By YasserKhalil in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-25-2014, 01:14 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 Position in Table Based on Table Value
    By lwflip in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-20-2013, 11:55 AM
  4. Pivot table error message but can't find the offending pivot table
    By dcoates in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 01-22-2013, 08:45 AM
  5. Replies: 0
    Last Post: 12-05-2012, 03:48 PM
  6. Find Differences between Old table and New Table
    By MarvinP in forum Access Tables & Databases
    Replies: 2
    Last Post: 03-02-2012, 06:57 PM
  7. find a corresponding value from a table
    By aman1234 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-27-2010, 11:31 AM

Tags for this Thread

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