Matching two reports

wjohnson

New Member
Joined
Jan 5, 2024
Messages
1
Office Version
  1. 365
Platform
  1. MacOS
Hi! I am trying to take two values from one sheet- column A is an invoice number and column B is an amount and comparing that to another report with the same information in both columns. It won't let me merge the two columns. How can I see if that invoice number with the amount of the invoice (in column B) matches the other sheet that is set up the same way? The other sheet has multiple charges from the same invoice number with different amounts so I need to narrow it down so I can remove the duplicate columns. Hope this makes sense!
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
Welcome to the Board!

You could use a COUNTIFS function, to count how many records on the second sheet match, when checking both column A and B, i.e.
Excel Formula:
=COUNTIFS(Sheet2!A:A,A1,Sheet2!B:B,B1)
(when this formula is placed on Sheet1, it checks the number of rows on Sheet2 what match what is in the combination of A1 and B1 on Sheet1)

If it returns a value greater than 0, then there are matches, i.e.
Excel Formula:
=IF(COUNTIFS(Sheet2!A:A,A1,Sheet2!B:B,B1)>0,"Matches found","No matches found")

If you want to see if there are duplicates, check to see if there are more than one match:
Excel Formula:
=IF(COUNTIFS(Sheet2!A:A,A1,Sheet2!B:B,B1)>1,"Duplicates found","No duplicates found")
 
Upvote 0

Forum statistics

Threads
1,215,076
Messages
6,122,987
Members
449,093
Latest member
Mr Hughes

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