How to MATCH EXACTLY 2 values & get the desired result

hsandeep

Well-known Member
Joined
Dec 6, 2008
Messages
1,226
Office Version
  1. 2010
Platform
  1. Windows
  2. Mobile
Column D5:D9999 contains either of 5 values: ABC, MNO, XYZ, #N/A, null
Column E5:E9999 contains either of 4 values: WORKING, NOT WORKING, #N/A, null.
In F5:F9999, I want value of Z1 if column D MATCHES EXACTLY as X1 AND column E MATCHES EXACTLY as Y1 else AB1.
Ex:
Z1=Good, X1=ABC, Y1=WORKING, AB1=Bad
For D5=ABC AND E5=WORKING
F5=Good (Answer)

Z1=Good, X1=ABC, Y1=WORKING, AB1=Bad
For D5=ABC AND E5=WOrkiNG
F5=Bad (Answer)
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
Hi,

Maybe try something like this:

=IF(AND(D5=X$1,ISNUMBER(FIND(D5,X$1)),E5=Y$1,ISNUMBER(FIND(E5,Y$1))),Z$1,AB$1)

To handle the #N/A's properly it might be easier to remove them from the source columns in the first place.
 
Last edited:
Upvote 0
Column D5:D9999 contains either of 5 values: ABC, MNO, XYZ, #N/A, null
Column E5:E9999 contains either of 4 values: WORKING, NOT WORKING, #N/A, null.
Is the #N/A text that you typed in or is it an error result from a formula? Also, is null a text word or is it meant to mean the empty string ("") in the cell? If it is a text word, it was meant to be all lower case as you show (which is different than the all upper case you show for the other words), correct?
 
Upvote 0
Column D5:D9999 contains either of 5 values: ABC, MNO, XYZ, #N/A, null
Column E5:E9999 contains either of 4 values: WORKING, NOT WORKING, #N/A, null.
Is the #N/A text that you typed in or is it an error result from a formula? Also, is null a text word or is it meant to mean the empty string ("") in the cell? If it is a text word, it was meant to be all lower case as you show (which is different than the all upper case you show for the other words), correct?
 
Upvote 0
#N/A it is an error result from a formula.
null means the empty string ("") in the cell
 
Upvote 0
#N/A it is an error result from a formula.
null means the empty string ("") in the cell
One other question... is it possible for #N/A to be on one column but not the other? In other words, could D2 be #N/A when E2 is WORKING, NOT WORKING or null? Or could D2 be ABC, MNO, XYZ or null when E2 is #N/A?
 
Upvote 0

Forum statistics

Threads
1,220,965
Messages
6,157,119
Members
451,398
Latest member
rjsteward

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