ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   find duplicate entry and replace across sheets (https://www.excelbanter.com/excel-programming/385322-find-duplicate-entry-replace-across-sheets.html)

splat

find duplicate entry and replace across sheets
 
Morning,

I need some help on this please.

Sheet 1 has data from A1 to AP11000. Sheet 2 has data from A1 to
D28000.
Column A is inventory number in both sheets.

I need to do the following: If the same inventory number exists in
sheet 1 and 2, replace the complete row in sheet 2 with the entry from
sheet 1. If it does not exist in sheet 1, but exists in sheet 2,
leave the entry in sheet 2 alone. Sheet 2 will be the new master
sheet.

Thanks


Damien McBain[_3_]

find duplicate entry and replace across sheets
 
splat wrote:

Morning,

I need some help on this please.

Sheet 1 has data from A1 to AP11000. Sheet 2 has data from A1 to
D28000.
Column A is inventory number in both sheets.

I need to do the following: If the same inventory number exists in
sheet 1 and 2, replace the complete row in sheet 2 with the entry from
sheet 1. If it does not exist in sheet 1, but exists in sheet 2,
leave the entry in sheet 2 alone. Sheet 2 will be the new master
sheet.


Assuming all the inventory numbers are unique, you could do it with
worksheet formulas in Sheet3. Paste this in Sheet3!A1:

=IF(ISNA(VLOOKUP(Sheet2!$A1,Sheet1!$A$1:$A$11000,1 ,FALSE)),Sheet2!A1,VLOOKUP(Sheet2!$A1,Sheet1!$A$1: $AP$11000,1,FALSE))

Fill it across to AP1
Change the column number in the last vlookup to 2 for column B, 3 for
column D etc.
Fill the formulas down as far as you like.

Sheet3 is the new master and you don't bugger up your original lists :)

splat

find duplicate entry and replace across sheets
 
Thanks Damien,

Works like a charm.



All times are GMT +1. The time now is 11:35 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com