Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
boreal
 
Posts: n/a
Default Query doesn't add/delete data in rows on refresh

I have a spreadsheet with columns A-F pulling in data through MS query and
columns G-U having data the is manually entered by a user and is intended to
be "linked" to the data appearing in A-F.

To be more detailed, columns A-F represent customer order information from
our inventory system, while G-U represent payment information. When new
records are added or deleted within the query range on the left, rows ought
to be removed or added (with blanks) in the corresponding spots on the right.

I have tried changing the query properties to:
- insert entire rows for new data, clear unused cells
OR
- overwrite existing cells with new data, clear unused cells
This does not change the data on the righthand side.

Then, I added a bogus column G that contains a useless formula in the hopes
that the "fill down formulas in columns adjacent to data" option would force
data to the right to propogate down with the corresponding data on the left
when the query is refreshed. This doesn't work. Only the formula itself
propogates down.

How can I ensure that the data (entered manually) on the righthand side of
my spreadsheet continues to correspond to the data (from a query) on the
lefthand side when rows are added and/or deleted through the query refresh
process?


  #2   Report Post  
Junior Member
 
Posts: 1
Default

Were you ever able to figure out this issue? I'm having the same issue. I work for a school and have 200 kids with data. I used a query to fileter in demographic data and the teachers have enter in their data manually. But if I have to add a new student it messes up all the data on the right side that the teacher entered. Help.. I'm completely at a loss.

Thanks,
Shetal



Quote:
Originally Posted by boreal View Post
I have a spreadsheet with columns A-F pulling in data through MS query and
columns G-U having data the is manually entered by a user and is intended to
be "linked" to the data appearing in A-F.

To be more detailed, columns A-F represent customer order information from
our inventory system, while G-U represent payment information. When new
records are added or deleted within the query range on the left, rows ought
to be removed or added (with blanks) in the corresponding spots on the right.

I have tried changing the query properties to:
- insert entire rows for new data, clear unused cells
OR
- overwrite existing cells with new data, clear unused cells
This does not change the data on the righthand side.

Then, I added a bogus column G that contains a useless formula in the hopes
that the "fill down formulas in columns adjacent to data" option would force
data to the right to propogate down with the corresponding data on the left
when the query is refreshed. This doesn't work. Only the formula itself
propogates down.

How can I ensure that the data (entered manually) on the righthand side of
my spreadsheet continues to correspond to the data (from a query) on the
lefthand side when rows are added and/or deleted through the query refresh
process?
  #3   Report Post  
Member
 
Location: Bangalore
Posts: 41
Smile

Quote:
Originally Posted by Shetal Shah View Post
Were you ever able to figure out this issue? I'm having the same issue. I work for a school and have 200 kids with data. I used a query to fileter in demographic data and the teachers have enter in their data manually. But if I have to add a new student it messes up all the data on the right side that the teacher entered. Help.. I'm completely at a loss.

Thanks,
Shetal
Hi Shetal,
It is indeed frustrating. I tried several options but couldn't get through. One suggestion that I have is to use a bit of VBA (I can help you with the code if you are happy with the idea). The idea is to run a VBA macro that creates a copy of your existing sheet and then refreshes the data from your query. The new data then refers to the old sheet and applies a lookup function (using a unique ID) to get all the details of existing rows of data. This way you don't have to worry about the position of your data. At the end of it the macro deletes the dummy sheet.

It may sound like a big task but shouldn't take more than 10-15 lines of VBA code.

By the way, if you come across a better idea please let me know.

Thanks
Prashant Kumar Pathak
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Inserting a new line in spreadsheet Rental Man Excel Discussion (Misc queries) 2 January 9th 06 04:55 PM
Importing Microsoft query data into excel changes linked rows Wazzy_bear Links and Linking in Excel 1 December 19th 05 09:09 AM
This query returned no data Tjeerd Excel Worksheet Functions 0 September 22nd 05 10:00 PM
Dealing with data in several columns AND rows RJPerri Excel Discussion (Misc queries) 2 September 14th 05 12:57 PM
Pivot Table for survey data w/ questions as Rows & poss answrs as pfwebadmin Excel Discussion (Misc queries) 0 May 17th 05 02:31 PM


All times are GMT +1. The time now is 07:27 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"