Checking if a number appears within a cell

M

moonrabbit

Hi,

I have a column of cells that contain data that looks like this...

VI 06 08 09 10 11 12 13 17 18 21 22 24 31 41 56 67 72 73 74 75

I would like the cell next to it to tell me if a number between 1 and 7
(inclusive) appears within this cell. I know how to check for the
appearance of a string, but not a numeric value that falls within a
specified range.

Any help would be much appreciated

moonrabbit
 
M

MMuscat

I hope I understood you correctly

=IF(AND(A1>=1,A1<=7), "Value is >1<7", "Value is not >1<7")

Alternatively you can change the font tin Wingdings 2 and use P
(standing for very good) and O (for wrong) but make sure they are
capital P and O!

hope it was usefull!!
 
D

Dave O

Assuming your string is in cell A1, this formula
=OR(ISNUMBER(FIND(" 01",A1,1)),ISNUMBER(FIND("
02",A1,1)),ISNUMBER(FIND(" 031",A1,1)),ISNUMBER(FIND("
04",A1,1)),ISNUMBER(FIND(" 05",A1,1)),ISNUMBER(FIND("
06",A1,1)),ISNUMBER(FIND(" 07",A1,1)))
....returns TRUE if a number between 1 and 7 appears in the string. The
formula assumes there is a space before each number and that the 1
appears as "01", etc.
 
Top