Need help with IF(MATCH formula

zazybang

New Member
Joined
May 6, 2018
Messages
23
I am trying to use an IF statement to place this or that based on the criteria. For the criteria i am using a MATCH statement to see if a cell matches a individual cell amongst a range. The issue i have is that when the criteria is false it does not use the false function of the IF statement instead it says N/A, however when the Match statement is true it works properly. Formula: =IF(MATCH(J6,B6:B41,0),"Yes","No")
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
Welcome to the forum Zazybang,

Try this

=IF(COUNTIF(B6:B41,J6),"Yes","No")
 
Last edited:
Upvote 0
I am trying to use an IF statement to place this or that based on the criteria. For the criteria i am using a MATCH statement to see if a cell matches a individual cell amongst a range. The issue i have is that when the criteria is false it does not use the false function of the IF statement instead it says N/A, however when the Match statement is true it works properly. Formula: =IF(MATCH(J6,B6:B41,0),"Yes","No")

Add the ISNUMBER test for MATCH returns a position indication number if successful, otherwise #N/A. ISNUMBER ignores error values...
Rich (BB code):
=IF(ISNUMBER(MATCH(J6,B6:B41,0)),"Yes","No")

This particular formula can be expressed more succinctly:
Rich (BB code):
=ISNUMBER(MATCH(J6,B6:B41,0))+0

1 as result means a hit, 0 a miss.

By the way, ISNUMBER(MATCH(... is faster than COUNTIF(S).
 
Upvote 0

Forum statistics

Threads
1,215,621
Messages
6,125,884
Members
449,269
Latest member
GBCOACW

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