Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9
Default How to update list data

Hi,

Below are two lists. Data is located in the first two columns. Each list has
over one thousand items. How do you write a program to update only the
prices in the old list using the data from the new list?


Old.xls New.xls

AA1 12.25 AA1 11.50
AA2 20.45 AA2 7.20
------ ------- ------ --------
------ ------- ------ --------
BB1 30.20 BB1 30.00
BB2 46.60 BB7 18.45
------ ------- ------ --------
------ ------- ------ --------
ZZ46 56.35 ZZ21 14.00

The columns are different in length and their items don't match completely.
Much appreciate if anyone can help.

TIA
tom

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 806
Default How to update list data

Hello Tom,

Open both files. Add a third column into Old.xls: Enter into C1:
=IF(ISERROR(MATCH(A1,[New.xls]Sheet1!$A:$A,0)),B1,[New.xls]Sheet1!B1)
and copy down.

Check values in column C thoroughly. If you are satisfied with the
result, copy their values (not formulas!) into column B and delete
column C.

Regards,
Bernd
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9
Default How to update list data

Hi Bernd,

Thank you for your suggestion. I think your idea would work if the two lists
contain identical items and are listed in the same order. The new list I am
using has several items missing. As well, it has some new ones (which I'm
not interested in) and is different in its listing order compared to the old
list.

Regards,
tom
"Bernd P" wrote in message
...
Hello Tom,

Open both files. Add a third column into Old.xls: Enter into C1:
=IF(ISERROR(MATCH(A1,[New.xls]Sheet1!$A:$A,0)),B1,[New.xls]Sheet1!B1)
and copy down.

Check values in column C thoroughly. If you are satisfied with the
result, copy their values (not formulas!) into column B and delete
column C.

Regards,
Bernd


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 806
Default How to update list data

Hello Tom,

Sorry, I forgot the INDEX(MATCH()):
=IF(ISERROR(MATCH(A1,[New.xls]Sheet1!$A:$A,0)),B1,INDEX([New.xls]
Sheet1!$B:$B,MATCH(A1,[New.xls]Sheet1!$A:$A,0)))

Regards,
Bernd

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9
Default How to update list data

Hi Bernd,

Aha! Everything now matches perfectly. What a wonderful function,
INDEX(MATCH()) - saves lots of work. Thanks Bernd that was great.

Regards,
Tom

"Bernd P" wrote in message
...
Hello Tom,

Sorry, I forgot the INDEX(MATCH()):
=IF(ISERROR(MATCH(A1,[New.xls]Sheet1!$A:$A,0)),B1,INDEX([New.xls]
Sheet1!$B:$B,MATCH(A1,[New.xls]Sheet1!$A:$A,0)))

Regards,
Bernd




  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 806
Default How to update list data

Hello Tom,

You are welcome. Thanks for your feedback.

Regards,
Bernd
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
Automatic Update of Dropdown List Box data Rajat Excel Worksheet Functions 4 March 8th 12 05:09 PM
Data Validation lists update orginal cell with list update [email protected] Excel Worksheet Functions 3 July 11th 08 07:56 AM
how do I update a list to overwrite duplicates with new data marshall Excel Discussion (Misc queries) 0 February 21st 06 04:56 PM
update data validation list with new entries?? cjtj4700 Excel Discussion (Misc queries) 10 December 12th 05 01:00 AM
Update Excel Data List for Drop Down use LynnS Excel Discussion (Misc queries) 2 June 10th 05 11:35 PM


All times are GMT +1. The time now is 05:42 AM.

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

About Us

"It's about Microsoft Excel"