Help with MATCH function

G

Guest

Guest
I am trying to compare two lists of data, each containing client names.

I want to set a function that tests to see if a name in Col B appears in Col F. So far, I've got this formula:

=IF(MATCH(B8,$F$8:$F$186,0),"Y","N")

It works when the exact match is found, but if no match is found it returns #N/A. Clearly my IF statement isn't working.

Any ideas on where I'm going wrong?
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
On 2002-02-26 08:39, Anonymous wrote:
I am trying to compare two lists of data, each containing client names.

I want to set a function that tests to see if a name in Col B appears in Col F. So far, I've got this formula:

=IF(MATCH(B8,$F$8:$F$186,0),"Y","N")

It works when the exact match is found, but if no match is found it returns #N/A. Clearly my IF statement isn't working.

Any ideas on where I'm going wrong?

Try:

=IF(ISNUMBER(MATCH(B8,$F$8:$F$186,0)),"Y","N")

or simpler:

=IF(COUNTIF($F$8:$F$186,B8),"Y","N")
 
Upvote 0
I know wat is the problem.

=IF(MATCH(B8,$F$8:$F$186,0),"Y","N") <--------this is wrong
=IF(ISNA(MATCH(B8,$F$8:$F$186,0), "N", "Y") <------try this....

See wat happens is that.......when you use match function........if match doesnt not find the value......it will show #NA error.....so wat i have done is the....i use the ISNA() function that return "True" if the error is #Na else false. I hope u got the idea....go try it......i have not test this in the database.....i hope it works............if not........u can ask me again.....

Programing is my Nick Name
 
Upvote 0

Forum statistics

Threads
1,213,506
Messages
6,114,025
Members
448,543
Latest member
MartinLarkin

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