+ Reply to Thread
Results 1 to 4 of 4

Find Function using a Dynamic Table in Excel

  1. #1
    Registered User
    Join Date
    03-29-2012
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    11

    Find Function using a Dynamic Table in Excel

    Thanks in advance for any help.

    Let me first describe my table: I have a table in Excel that is tied to data in Access. There is a button that I can press that will automatically import the data from Access based on a date and set of times inputted by the user. If the data pulled fills in 15 rows, then the table expands or shrinks to 15 rows. If it's 30, then it grows to 30. The user then can add to the data and export it back to Access.

    What I am working on doing is adding an Update button. This will work similarly to the Import button, but will recognize any data that has been added to the Excel table and instead of overwriting that data, will simply update and add or remove any rows based on the new parameters.

    My problem: To update and not replace current data in Excel, I am using the following code:

    Please Login or Register  to view this content.
    If the updated table is the exact same number of rows, it works fine. If its fewer rows, it works fine. The problem is if the table expands. What will occur is that it will only search the same number of rows that were in the table initially. So, if I have 15 rows and update it to make 30, it will only search the first 15 rows on the new table and the rest of the data I am looking to replace gets lost.

    Sorry about any confusion in my explanation, but I am happy to clarify any details you may need to offer assistance.

    Thanks again!

  2. #2
    Registered User
    Join Date
    03-29-2012
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: Find Function using a Dynamic Table in Excel

    Any thoughts on this? I know I could simply enlarge the table and not have to worry about this, but I really prefer to have the table match the amount of data entered and not simply slow everything down by having 250 blank rows.

  3. #3
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Find Function using a Dynamic Table in Excel

    Can't you just do this again after the update?

    Please Login or Register  to view this content.
    Entia non sunt multiplicanda sine necessitate

  4. #4
    Registered User
    Join Date
    03-29-2012
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: Find Function using a Dynamic Table in Excel

    Uhm...of course that's right. I didn't try to Set the range again. I tried to count the rows again, but of course it was going off my original Set still! Thanks. I knew it'd be something simple.

+ 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