+ Reply to Thread
Results 1 to 8 of 8

Data to the right of my query won't stay with the corresponding data

  1. #1
    Registered User
    Join Date
    09-19-2019
    Location
    San Antonio, TX
    MS-Off Ver
    2013
    Posts
    4

    Data to the right of my query won't stay with the corresponding data

    I have a data set that I am importing to Excel using an ODBC connection. I have information to the right of the created table that adds detail to that corresponding record. However, when I refresh, Excel doesn't keep my details with that corresponding record. Is there any way to bypass this, and still allow refreshes to load more records to my data set?

  2. #2
    Valued Forum Contributor
    Join Date
    01-14-2013
    Location
    Austria
    MS-Off Ver
    2016 / 2019
    Posts
    339

    Re: Data to the right of my query won't stay with the corresponding data

    I think this is only possible either with VBA or PowerQuery.

    you need another table (shadow table) which has the same data as your import table but including your additional columns.
    Each import must trigger a refresh which adds only new imported data to your shadow table.

  3. #3
    Registered User
    Join Date
    09-19-2019
    Location
    San Antonio, TX
    MS-Off Ver
    2013
    Posts
    4

    Re: Data to the right of my query won't stay with the corresponding data

    Hi Gue2013, thank you for that.

    I'm not too familiar with the concept of a shadow table. Is it a direct reference (=) to the original table?

  4. #4
    Valued Forum Contributor
    Join Date
    01-14-2013
    Location
    Austria
    MS-Off Ver
    2016 / 2019
    Posts
    339

    Re: Data to the right of my query won't stay with the corresponding data

    It is not a reference, it is a copy.
    in VBA:
    the first time: copy the data to another sheet or area and add here your details to each record (final table). This is the table you want to work with.
    following imports: compare the imported data with your "final table" and update each record (row) and add new data at the end of the table.

    in PowerQuery (less effort compared to VBA):
    there are a few infos on the WEB. I always use https://exceleratorbi.com.au/self-re...s-power-query/

    If you still use MS-office 2013 then you have to install it. In later versions PQ is already included.

  5. #5
    Registered User
    Join Date
    09-19-2019
    Location
    San Antonio, TX
    MS-Off Ver
    2013
    Posts
    4

    Re: Data to the right of my query won't stay with the corresponding data

    Gue, this is amazing. Thank you so much for these resources. I have not had the chance to work with Power Queries prior to this, and spent the majority of the week trying to figure it out. The solution it seems just to work just fine, as the blog says, until you get to duplicate data. I don't have duplicate values in my source data, but since my data is connected to our work order system, every time I refresh, the Power Query is appending another full record set of work orders to my existing list.

  6. #6
    Registered User
    Join Date
    09-19-2019
    Location
    San Antonio, TX
    MS-Off Ver
    2013
    Posts
    4

    Re: Data to the right of my query won't stay with the corresponding data

    I'm going to continue researching until I get it--thanks again for all the help!

  7. #7
    Valued Forum Contributor
    Join Date
    01-14-2013
    Location
    Austria
    MS-Off Ver
    2016 / 2019
    Posts
    339

    Re: Data to the right of my query won't stay with the corresponding data

    Happy that I could help you

  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
    80,745

    Re: Data to the right of my query won't stay with the corresponding data

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.
    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. Stay in same cell until data is entered
    By melverz in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-09-2019, 11:06 AM
  2. How to stay on same sheet after running excel query
    By watermasa in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-04-2019, 06:44 AM
  3. [SOLVED] How to get External link data to stay
    By rogrand in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-16-2019, 03:13 PM
  4. VBA for row height to stay with data
    By Delta729 in forum Excel General
    Replies: 6
    Last Post: 08-20-2016, 12:30 AM
  5. How to get cells with static data to stay in the row it correlates to
    By romeshomey in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-23-2015, 12:29 AM
  6. Replies: 1
    Last Post: 12-20-2013, 06:15 AM
  7. Replies: 1
    Last Post: 01-12-2011, 07:28 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