Help with formula matching 2 columns verse 2 other columns

zone709

Well-known Member
Joined
Mar 1, 2016
Messages
2,125
Office Version
  1. 365
Platform
  1. Windows
Hi trying to have a certain kind of formula in column E so it can tell me if its a match or not. A & B would have to match C & D or not. Just the ID and amount verse each other.
I can do the formula to match one column verse the other but having a hard time on two columns matches thanks.

Book1
ABCDE
1ID Amount IDAmountForumla Needed
24$ 25.00425Match
35$ 50.00555No Match
47$ 75.00770No Match
Sheet1
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
How about
Book2
ABCDE
1ID Amount IDAmountForumla Needed
2425425match
3550555no match
4775770no match
Sheet5
Cell Formulas
RangeFormula
E2:E4E2=IF(A2:A4&B2:B4=C2:C4&D2:D4,"match","no match")
Dynamic array formulas.
 
Upvote 0
How about
Book2
ABCDE
1ID Amount IDAmountForumla Needed
2425425match
3550555no match
4775770no match
Sheet5
Cell Formulas
RangeFormula
E2:E4E2=IF(A2:A4&B2:B4=C2:C4&D2:D4,"match","no match")
Dynamic array formulas.
Thank you for you help.
 
Upvote 0
Taking a second look the above solution. There's a scenario that would fail. This one should be better.

Book1
ABCDEF
1ID Amount IDAmountForumla Needed
2425425match
3550555no match
4775770no match
5425425no match
6425425match<-Old formula is wrong
Sheet4
Cell Formulas
RangeFormula
E2:E5E2=IF(AND(A2=C2,B2=D2),"match","no match")
E6E6=IF(A6&B6=C6&D6,"match", "no match")
 
Upvote 0
Hi thanks for the reply. You know what. I just ran into another issue small.

I need to change this a little. I need it to look though the whole column for id and amount to give me results on a match or not. Most of the time the columns of ID's wont be in the same line number.
Example below.
I yellowed the ones that matched and oranged the ones that didn't match.


Book1
ABCDE
1ID AMOUNT ID AMOUNT Formula
24$ 25.008$ 21.00Match
35$ 23.004$ 20.00No Match
47$ 12.0010$ 21.00No Match
58$ 21.007$ 12.00Match
610$ 22.005$ 23.00Match
Sheet1
 
Upvote 0
How about this? In the case the ID in col A is not found in col C, it'll return "not found".
Book1
ABCDE
1ID AMOUNT ID AMOUNT Formula
2425821no match
3523420match
47121021match
5821712match
61022523no match
Sheet7
Cell Formulas
RangeFormula
E2:E6E2=LET(b,BYROW(A2:A6,LAMBDA(r,XLOOKUP(r,C2:C6,D2:D6,,0)))=B2:B6,IF(ISERROR(b),"not found",IF(b,"match","no match")))
Dynamic array formulas.
 
Upvote 0
The array works great. This is a much better option. Thanks for the help again.
 
Upvote 0
Hi wait i been trying this formula right and it wasn't working. Even in your sheet above.
Look at C2 and D2 it says no match next to it, but it matches A5 and B5 Both match ID 8 & 21 - So it should come back Match
 
Upvote 0
The match and found result is currently based on A not C. Do you want it to be based on column C?

A2 is ID 4 with an amount 25, which does not match amount of 20 in D. It returns no match for A2.
 
Upvote 0
ok i get it now. yeah rather go off of C.
When i drag this formula down i think ill need to at least lock the A, C, D & B ike below?
Or else the formula wont look at above ID's #'s above the drag down. When i drag it down to lets say line 10. Its not looking above it anymore.

=LET(b,BYROW(A$2:A6,LAMBDA(r,XLOOKUP(r,C$2:C6,D$2:D6,,0)))=B$2:B6,IF(ISERROR(b),"not found",IF(b,"match","no match")))
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,875
Members
452,363
Latest member
merico17

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