Formula to find if a number exists in a range of cells?

LaurenJez

New Member
Joined
Apr 19, 2023
Messages
11
Office Version
  1. 2016
Platform
  1. Windows
Hello. I am using the below formula to find if a number (1 to 9) exists in a cell. The formula works, but what I really want is a formula that checks if a number (1 to 9) exists in a range of cells. Can anyone help with this?

Current formula that works: =IF(COUNT(FIND({1,2,3,4,5,6,7,8,9},O2))>0, "Yes", "No")

What I want but is not working: =IF(COUNT(FIND({1,2,3,4,5,6,7,8,9},O2:AB2))>0, "Yes", "No")

1682538111212.png
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
How about
Excel Formula:
=IF(COUNT(FIND({1,2,3,4,5,6,7,8,9},CONCAT(O2:AB2)))>0, "Yes", "No")
 
Upvote 0
This formula should count the number of cells in the range from 1 to 9
=COUNTIFS(O2:AB2,">=1",O2:AB2,"<=9")

...and if you want Yes or No to return when the count is > 0 then use this:
=IF(COUNTIFS(O2:AB2,">=1",O2:AB2,"<=9")>0,"Yes","No")
 
Upvote 0
Not for me it doesn't
Fluff.xlsm
NOPQRSTUVW
1
2Yes254A
Main
Cell Formulas
RangeFormula
N2N2=IF(COUNT(FIND({1,2,3,4,5,6,7,8,9},CONCAT(O2:AB2)))>0, "Yes", "No")
 
Upvote 0
Not for me it doesn't
Fluff.xlsm
NOPQRSTUVW
1
2Yes254A
Main
Cell Formulas
RangeFormula
N2N2=IF(COUNT(FIND({1,2,3,4,5,6,7,8,9},CONCAT(O2:AB2)))>0, "Yes", "No")

Here is what's happening for me -- let me know your thoughts what I'm doing wrong:

1682540237267.png
 
Upvote 0
Are you using 365 as per your profile, or are you using an older version?
 
Upvote 0
In that case why does your profile say 365, maybe you need to change it?

Try confirming the formula with Ctrl Shift Enter, rather than just Enter.
 
Upvote 0
@ LaurenJez: Your original range formula from Post #1 needs a slight modification to work (and being confirmed using Ctrl Shift Enter, not just Enter)
Excel Formula:
=IF(COUNT(FIND({1;2;3;4;5;6;7;8;9},O2:AB2))>0,"Yes","No")
 
Upvote 0

Forum statistics

Threads
1,215,514
Messages
6,125,267
Members
449,219
Latest member
daynle

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