matching number

xoxo

Board Regular
Joined
Mar 29, 2009
Messages
198
What is the best way to do this in formula to find matching number?

On A1 I have 123. The range is J7:O34 which has 3 digits per cell. Would like to have indicator of 1 or a 0 on B1 to let me know if there is a match (1) or no match (0).

I tried using =COUNTIF(J7:O34,"=A1") but does not work. :(

Appreciate any help,
xoxo
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
I'm not sure, but I don't think you need the quotes around =A1. Because then excel looks for a cell with that exact text in it. I'm trying it myself now
 
Upvote 0
Try

=COUNTIF(J7:O34,A1)>0

This will give TRUE or FALSE (not 1 or 0)

If it must be 1 or 0, then put the N function around it..

=N(COUNTIF(J7:O34,A1)>0)


Hope that helps.
 
Upvote 0

Forum statistics

Threads
1,224,586
Messages
6,179,726
Members
452,939
Latest member
WCrawford

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