How to compare a value in two spreadsheets

edojan

New Member
Joined
Jan 3, 2007
Messages
28
Hi

I need to compare the values and see if they match or not. If they match for it to say "MATCH" or if not error or something. They key is the SalesID and it has other columns that need to be matched see below.

Thanks!


Sheet 1:
Sales ID, Prod1, Prod2,Prod 3
1,55,6,7
2,2,6,77
3,0,x,y


Sheet 2:
Sales ID, Prod1, Prod2,Prod 3
1,55,6,7
2,2,6,55
3,b,a,z

Sheet 3: (What it should look like)
Sales ID, Prod1, Prod2,Prod 3
1,match,match,match
2,match,match,error
3,error,error,error
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
I assume they do not always line up row for row, but if they do this can be a lot simpler than I have made it:
Excel Workbook
ABCD
1Sales IDProd1Prod2Prod3
215567
322677
430xy
Sheet1
Excel Workbook
ABCD
1Sales IDProd1Prod2Prod3
215567
322655
43baz
Sheet2
Excel Workbook
ABCD
1Sales IDProd1Prod2Prod3
21matchmatchmatch
32matchmatcherror
43errorerrorerror
Sheet3
Cell Formulas
RangeFormula
B2=IF(INDEX(Sheet1!$B$2:$D$4,MATCH($A2,Sheet1!$A$2:$A$4,0),MATCH(B$1,Sheet1!$B$1:$D$1,0))=INDEX(Sheet2!$B$2:$D$4,MATCH($A2,Sheet2!$A$2:$A$4,0),MATCH(B$1,Sheet2!$B$1:$D$1,0)),"match","error")

Hope that helps and post back with any questions.
 
Upvote 0

Forum statistics

Threads
1,224,597
Messages
6,179,808
Members
452,944
Latest member
2558216095

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