Aligning manually entered data with external data (query)

Giunca

New Member
Joined
Feb 29, 2008
Messages
20
(Running XL 2007 on XP)
I have a basic query that returns data from a database to a sheet in my workbook (one record per row). I want to enter data into a cell adjacent to the returned data that will "stick with" the record that it is next to. The problem is that if the external data changes (records added or deleted), upon refresh of the query my text doesn't move with the record it was originally next to.

I have worked through the External Data Properties options (i.e. "Insert Cells...", "Insert Rows...", "Overwrite Existing..."), but none of these options gives me what I need. My text always gets misaligned from the record I originally put it next to. Is there a way to make manually entered data stick next to the records of the underlying external data?

Basic example:

Column A = records returned from the query
Column B = data manually entered into the spreadsheet by me

A * B
-------------------------------------------------
0003 *
0005 *
0010 * comments about record # 0010
0014 *
0019 *
0024 * comments about record # 0024

If record 0004 is added and record 0019 is deleted with the next refresh, I want the comments for records 0010 and 0024 to stay with their respective records. Chart would then look like this:

0003 *
0004 *
0005 *
0010 * comments about record # 0010
0014 *
0024 * comments about record # 0024

Make sense? Any ideas?
Thanks much.
 
I'm having trouble figuring out how to specify the Excel path in the updated query with the join (after the "too become" instruction, labeled "worksheet") to get this to work .
I keep getting an "invalid path" error. I'm thinking I might need to alter the connection string or there is some sort of special notation for the path, but I've never tried this before and can't figure out how to make this join happen despite my best googling. Any help in figuring out how to make this work would be greatly appreciated.
 
Last edited by a moderator:
Upvote 0

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.

Forum statistics

Threads
1,223,910
Messages
6,175,320
Members
452,635
Latest member
laura12345

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top