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

Tupelo1984

New Member
Joined
Jan 26, 2021
Messages
22
Office Version
  1. 365
Platform
  1. Windows
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:
1626959900306.png

=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
1626960215382.png

=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

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
Try using the ISNUMBER() condition. Use the desired if-else to generate the result. I hope this works.
 
Upvote 0

Forum statistics

Threads
1,214,991
Messages
6,122,628
Members
449,095
Latest member
bsb1122

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