Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel Formula help 1

Status
Not open for further replies.

AMS100

Programmer
Oct 19, 2001
111
GB
Hi,
I have 2 sets of data (take from the same original file) that I would like to pair up and compare. The format of the 2 datasets are 1 identifier number and a details field. Every line has an identifier, unique for each dataset i.e. won't appear again in the dataset but may appear in the other (but most have different details text). I would like to pair up the 2 datasets so I can amend the details accordingly. Maybe an example may help
Dataset 1 (the master):
1, Details1
2, Details2
3, Details3
4, Details4
5, Details5

Dataset 2
2, Changed details2
4, Changed details4
5, Changed details5

I need these on the same sheet in something like the format below:
1, Details1
2, Details2 2, Changed Details2
3, Details3
4, Details4 4, Changed Details4
5, Details5 5, Changed Details5

Any ideas on how to go about this - Im stumped! Thanks very much.
 
In your master sheet, assuming your 2 sets of data are in cols A&B with headers in row1
In C2, enter
=if(isna(vlookup(A2,sheet2!$A$1:$B$1000,2,false)),"",vlookup(A2,sheet2!$A$1:$B$1000,2,false))

where your data in the 2nd sheet is also in A&B and goes down to line 1000 - amend as per your layout

Rgds, Geoff
[blue]Si hoc signum legere potes, operis boni in rebus Latinus alacribus et fructuosis potiri potes![/blue]
Want the [red]best[/red] answers to your questions ? faq222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top