improving multiple match formula

Hlatigo

Well-known Member
Joined
Jun 3, 2002
Messages
677
I have the below formula that takes two rows and matches 5 data points. at the point if all five match then I get an "OK". if they dont I get a #N/A. I was hoping to ultimately get something that will tell me whcih cells dont match without having to use 5 or 6 nested IF statements. If this can be done in VBA easier that would be great as well.

thanks!




=IF(AND(MATCH(C32,M32),MATCH(D32,N32),MATCH(E32,O32),MATCH(F32,P32),MATCH(G32,Q32)),"OK","Please Review")
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
Thanks Andrew!

So I have changed to the below but i dont think it will work completely if there are mutiple non-exacts. Is there a way around this?

=IF(EXACT(C18,M18),IF(EXACT(D18,N18),IF(EXACT(E18,O18),IF(EXACT(F18,P18),IF(EXACT(G18,Q18),"OK","Review Offer Price"),"Review OrderQty"),"Product"),"Review Port"),"Review Vessel")
 
Upvote 0
Your formula worked when I tried it, with this order of cells:

D Vessel
E Port
F Product
G OrderQty
H Offer Price

It returns the first mismatch.
 
Upvote 0
Yes sir,

It works for me doing that as well. WHat if I have two mismatches. I was also thinking of doing conditional formatting but that seems to be too much work for about 200 rows...im too lazy hehehe
 
Upvote 0
What would you like to happen if there are multiple Non-Matches ??

I came up with this array formula that will return the FIRST non-match.

I've assumed you have headers (C1:G1) corresponding to the Text strings
"Offer Price","OrderQty","Product","Port","Vessel"

This formula is an array formula, requiring CTRL + SHIFT + ENTER

Code:
="Review " & INDEX(C1:G1,MATCH(FALSE,(C18:G18=M18:Q18),0))
This returns #N/A if they are all matches, but can be adjusted to return OK instead

Code:
=IF(ISNA(MATCH(FALSE,(C18:G18=M18:Q18),0)),"OK","Review " & INDEX(C1:G1,MATCH(FALSE,(C18:G18=M18:Q18),0)))
 
Upvote 0
HI jonmo1

The current formula using nested if...(although i prefer not using them) returns first nonmatch as well. I was hoping to get all non-matches to show up.

Yes, row 17 is a header with the Offer Price","OrderQty","Product","Port","Vessel" as titles.

Do you think its too much to point out all non matches for the user?
 
Upvote 0
So you would like the result to be

"Review Offer Price, Product, Vessel"

Yes I think that'll be overdoing it a bit...

Just let it identify the first.
User can correct the first
then the formula will now show the 2nd
user can then correct the 2nd..
 
Upvote 0

Forum statistics

Threads
1,214,614
Messages
6,120,519
Members
448,968
Latest member
Ajax40

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