# Match formula to exclude criteria

#### McNeil87

##### New Member
Hello!

Wondering if could have feedback on writing a formula that excludes specific criteria from a list. I started a formula that saysIF(ISERROR(MATCH(cellA1,lookupcolumn,0))=FALSE.

I’m confused by ISERROR. That essentially returns true if there is an error or false?
I want to write a formula that says ‘if cellB2 is in this list, then exclude but if cell B2 is not in this list, then include. But I’d like to return a true/false statement instead of saying ‘include’ or exclude’

### Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the \$ sign).

#### 6StringJazzer

##### Well-known Member
ISERROR is a function that returns TRUE if the part inside the parentheses results in an error. In this case, ISERROR is TRUE if MATCH cannot find a match. Your IF function is testing to see if ISERROR is FALSE, which is to say that MATCH did find a match.

What you showed is only a fragment of a formula. It is not a complete formula. The complete formula would look something like this.

=IF(ISERROR(MATCH(cellA1,lookupcolumn,0))=FALSE, found_a_match, no_match)

The parts in parentheses is where you put the results you want under these two conditions.

If you just want to return TRUE if B2 is found, and FALSE if it is not, then you can use this formula (you do not need an IF):
=ISNUMBER(MATCH(B2,lookupcolumn,0))

ISNUMBER will be TRUE if MATCH returns any number, meaning that B2 was found. It will be FALSE if MATCH returns an error.

#### McNeil87

##### New Member
Thank you for your detailed explanation and recommendation!!

Replies
1
Views
84
Replies
1
Views
96
Replies
1
Views
309
Replies
8
Views
141
Replies
4
Views
130

1,129,260
Messages
5,635,131
Members
416,842
Latest member
Ateen4ever

### 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.

### Which adblocker are you using?

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

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