Lewiy
Well-known Member
- Joined
- Jan 5, 2007
- Messages
- 4,284
I tested these - as far as I can tell there are several odd ones out.
The TEXT formula is the only one that doesn't return an error if A1 contains text.
If A1 contains 0, TEXT returns 0 and LEFT returns blank, the others return errors.
If A1 contains a 2 digit number, or a decimal such as 1.1, thing start to get interesting. Also the results for A1=10 are different from A1=11.<?xml:namespace prefix = o ns = "urn:schemas-microsoft-comfficeffice" /><o></o>
<o> </o>
You are quite right, there are various different results you can get from each depending on what value is entered in A1, however, the solution is a little deeper than that. The correct answer is SUBSTITUTE and here’s why:
<o> </o>
No matter what value/data type is in A1, be it an integer, a decimal, a text string, a boolean value or an error value, SUBSTITUTE is the only one that never has a result which is different from all the other three, there is always at least one of the other formulas which returns the same value as SUBSTITUTE. All of the others have uniquely different results from certain A1 values.