Text and Numeric Cells

HeavyMusic

New Member
Joined
Apr 15, 2022
Messages
1
Office Version
  1. 2011
Platform
  1. Windows
Hi,

I have two columns in my worksheet. In the cells, it has a text of "6-62" and converted into number is 22798. Other text cells are 12345 and converted to numbers are 12345. I am trying to do a if statement or text function to isolate the "6-62". If I do the if statement to say if 6-62 = 22798, say YES otherwise NO. It always says Yes. Using the text function, It shows that "6-62 and 22798 are not equal. But it also gives me the same for the text 12345 that in number format 12345 are not equal. Again , just trying to isolate where the text 6-62 is different that the converted text to number result of 22798. Thanks
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
If you're asking how 6-62 becomes 22798 then it's being interpreted as a date - June 01 1962 whereas 12345 is interpreted as either a string or a number.
AFAIK, if you change a cell format from say, text to number, you usually have to re-enter the value, else it has no effect on the cell contents. That's what I had to do to replicate your experience. Then again, by "converted into number is 22798" you might not have been referring to cell formatting, but fairly certain I can say that formatting has no effect on the data type.
I get an error flag if I enter 6-62 or '6-62
 
Upvote 0

Forum statistics

Threads
1,215,052
Messages
6,122,878
Members
449,097
Latest member
dbomb1414

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