Advanced return values that don't match and highlight cells

sdk1013

New Member
Joined
Dec 3, 2021
Messages
3
Office Version
  1. 365
Platform
  1. Windows
I'm looking for formulae that will compare Sheet1 and Sheet2, searching Sheet2 for cells that don't match columns C-E for the associated ID and Date (columns A & B) in Sheet1. Further, I'd like to highlight in Sheet1 whatever cells in columns C-E that don't have matches in that can be found in Sheet2. Ideally, a new set of columns in Sheet1 would also return the values from both sheets separated by a "/" to show the values that don't match between sheets.

For clarity, I have an older dataset with costs of events at 3 different locations and a new dataset that is supposed to include data from the old dataset, same 3 locations. For some reason, costs have been altered in the new dataset retroactively and I need to find the ID/Dates with any discrepancies in costs at any locations, given the associated ID/Date.

Example below...

Sheet1 before algorithm applied
IDDATELOCATION 1LOCATION 2LOCATION 3
1​
10/03/2016​
$12.60​
$34.16​
$34.16​
2​
10/03/2016​
$4.20​
$19.03​
$19.03​
6​
10/04/2016​
$12.60​
$34.16​
$34.16​
7​
10/04/2016​
$4.20​
$32.44​
$32.44​
8​
10/13/2016​
$12.60​
$34.16​
$34.16​
9​
10/13/2016​
$12.60​
$20.00​
$20.00​
10​
10/13/2016​
$12.60​
$34.16​
$34.16​
11​
10/13/2016​
$12.60​
$29.73​
$29.73​
14​
10/13/2016​
$12.60​
$34.16​
$34.16​
15​
10/13/2016​
$4.20​
$16.49​
$16.49​

Sheet2
IDDATELOCATION 1LOCATION 2LOCATION 3
1​
10/03/2016​
$12.60​
$34.16​
$34.16​
2​
10/03/2016​
$4.20​
$19.03​
$5​
6​
10/04/2016​
$5​
$34.16​
$34.16​
7​
10/04/2016​
$4.20​
$5​
$32.44​
8​
10/13/2016​
$12.60​
$34.16​
$5​
9​
10/13/2016​
$12.60​
$20.00​
$20.00​
10​
10/13/2016​
$12.60​
$34.16​
$34.16​
11​
10/13/2016​
$12.60​
$29.73​
$29.73​
14​
10/13/2016​
$5​
$34.16​
$34.16​
15​
10/13/2016​
$4.20​
$5​
$16.49​

Sheet1 after algorithm applied
IDDATELOCATION 1LOCATION 2LOCATION 3LOCATION 1checkLOCATION 2checkLOCATION 3check
1​
10/03/2016​
$12.60​
$34.16​
$34.16​
2​
10/03/2016​
$4.20​
$19.03​
$19.03
19.03 / 5
6​
10/04/2016​
$12.60
$34.16​
$34.16​
12.60 / 5
7​
10/04/2016​
$4.20​
$32.44
$32.44​
32.44 / 5
8​
10/13/2016​
$12.60​
$34.16​
$34.16
34.16 / 5
9​
10/13/2016​
$12.60​
$20.00​
$20.00​
10​
10/13/2016​
$12.60​
$34.16​
$34.16​
11​
10/13/2016​
$12.60​
$29.73​
$29.73​
14​
10/13/2016​
$12.60
$34.16​
$34.16​
12.60 / 5
15​
10/13/2016​
$4.20​
$16.49
$16.49​
16.49 / 5
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
Hi sdk,

Maybe this suits? sumproduct will only work if the location ranges are actually number values not text.

Advanced return values that don't match and highlight_sdk.xlsx
ABCDE
1IDDATELOCATION 1LOCATION 2LOCATION 3
2110/03/2016$12.60$34.16$34.16
3210/03/2016$4.20$19.03$5.00
4610/04/2016$5.00$34.16$34.16
5710/04/2016$4.20$5.00$32.44
6810/13/2016$12.60$34.16$5.00
7910/13/2016$12.60$20.00$20.00
81010/13/2016$12.60$34.16$34.16
91110/13/2016$12.60$29.73$29.73
101410/13/2016$5.00$34.16$34.16
111510/13/2016$4.20$5.00$16.49
Sheet2


Advanced return values that don't match and highlight_sdk.xlsx
ABCDEFGH
1IDDATELOCATION 1LOCATION 2LOCATION 3LOCATION 1checkLOCATION 2checkLOCATION 3check
2110/03/2016$12.60$34.16$34.16   
3210/03/2016$4.20$19.03$19.03  19.03 / 5.00
4610/04/2016$12.60$34.16$34.1612.60 / 5.00  
5710/04/2016$4.20$32.44$32.44 32.44 / 5.00 
6810/13/2016$12.60$34.16$34.16  34.16 / 5.00
7910/13/2016$12.60$20.00$20.00   
81010/13/2016$12.60$34.16$34.16   
91110/13/2016$12.60$29.73$29.73   
101410/13/2016$12.60$34.16$34.1612.60 / 5.00  
111510/13/2016$4.20$16.49$16.49 16.49 / 5.00 
Sheet1
Cell Formulas
RangeFormula
F2:H11F2=IF(SUMPRODUCT((Sheet2!$A$2:$A$11=$A2)*(Sheet2!$B$2:$B$11=$B2)*(Sheet2!C$2:C$11=C$2:C$11)*Sheet2!C$2:C$11)=0,TEXT(C2,"####.00")&" / "&TEXT(SUMPRODUCT((Sheet2!$A$2:$A$11=$A2)*(Sheet2!$B$2:$B$11=$B2)*Sheet2!C$2:C$11),"####.00"),"")
Cells with Conditional Formatting
CellConditionCell FormatStop If True
C2:E11Expression=F2<>""textNO
 
Upvote 0
Solution

Forum statistics

Threads
1,223,880
Messages
6,175,154
Members
452,615
Latest member
bogeys2birdies

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