View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Bob I Bob I is offline
external usenet poster
 
Posts: 2,819
Default When is text treated as number?



wrote:

On Nov 5, 3:54 pm, "Peo Sjoblom" wrote:

Text is always greater than a number in Excel
so when you precede a number with an apostrophe
it becomes text and thus is greater.



Thanks. I can see that you are right. When I put ABCD into A1 and
=(A1=2000) into A2, A2 results in TRUE.

But why?

I would expect comparing text to a number to result in a #VALUE error,
just as =A1-2000 does. Conversely, since =A1-2000 results in a
numeric result when A1 contains text that looks like a number, I would
expect =(A1=2000) to do a numeric comparison.

Just a curiosity.


You may compare two texts also, it is not a mathmatic operation.