# Formula doesn't apply condition for excluding numbers because cell is stored as text

#### Tupelo1984

##### New Member
Hi all,

I have two queries:

1/I am trying to figure out how I can make my formula take in consideration an exclusion if my cell contains a string of numbers (in this case if my cell contains 00000000) which is stored as text:
The formula below works fine when my cell is a cell stored as number. The objective is to return a result 0 if the cell contains 00000000

Results stored as text:

=IF(AND(COUNT(0/FIND('Quality Rules'!\$C\$2:\$C\$14,O2))),"0",IF(AND(COUNTIFS(O2,"<>.",O2,"<>*-*",O2,"<>00000000")),IF(AND(LEN(O2)>5,LEN(O2)<15),1,0)))

Results stored as number : example with 11111111

=IF(AND(COUNT(0/FIND('Quality Rules'!\$C\$2:\$C\$14,O2))),"0",IF(AND(COUNTIFS(O2,"<>.",O2,"<>*-*",O2,"<>111111111")),IF(AND(LEN(O2)>5,LEN(O2)<15),1,0)))

I can't use the text to columns function to reformat to number as I need the original entry to stay in my cell (00000000 would reformat to 0)

2/Additionally, I am not able to figure out to make the formula return 0 instead of FALSE

Thanks a lot for your help!

### Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.

#### pratikjoshi448

##### New Member
Try using the ISNUMBER() condition. Use the desired if-else to generate the result. I hope this works.

Replies
0
Views
118
Replies
10
Views
224
Replies
3
Views
69
Replies
4
Views
107
Replies
3
Views
159

1,141,299
Messages
5,705,573
Members
421,399
Latest member
hjweiss00

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