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

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
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,059
Messages
6,122,918
Members
449,093
Latest member
dbomb1414

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