What 'value' is a Dec2Bin output?
"EvilTony" wrote:
I'm trying to verify that the guess someone makes as to the binary equivalent
of a decimal number is correct.
Example
cell A1 holds, say, 8
User must enter their 'estimate' of the binary value of 8 in cell B1
cell C1 formula: =IF(DEC2BIN(A1)=B1,"Yes","No")
I cannot get this to return a "Yes" when B1 = 1000
----
Strangely, what does work is if I use the 'reverse'
cell c1 formula: =IF(BIN2DEC(B1)=A1,"Yes","No")
Why doesn't Excel 'see' an entry of 1000 as being the same as an putput of
1000 from Dec2Bin?
Excel doesn't see them as equal because the number 1000 is not the same as
the character string "1000".
Jerry
|