ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   LEN function (https://www.excelbanter.com/excel-discussion-misc-queries/135763-len-function.html)

Dave F

LEN function
 
A3 shows 1000.000
=LEN(A3) resolves to 4

I see 8 characters.

Another oddity:

A5 has the formula =1.023254546*10^3 which is displayed as 1023.25
=LEN(A5) resolves to 11

Neither of these make sense.

A7 shows 0
=LEN(A7) resolves to 1. This makes sense.

A9 shows 0.01
=LEN(A9) = 4. This makes sense.

Thoughts?

Dave
--
A hint to posters: Specific, detailed questions are more likely to be
answered than questions that provide no detail about your problem.

Dave Peterson

LEN function
 
There's no difference between the values 1000 and 1000.000. And =len() uses the
value.

And if you format the cell with that =1.023254546*10^3 formula in it to show
more decimals, you'll see that 1023.25 is just the way excel displays the value
when the number format is General.

Try shrinking the column and watch what gets displayed.

There's a difference between what's displayed and what the value is:

Try putting today's date in A1 with =len(a1) in B1.

Format A1 a few different ways -- especially:
dddd, mmmm dd, yyyy
and watch B1.



Dave F wrote:

A3 shows 1000.000
=LEN(A3) resolves to 4

I see 8 characters.

Another oddity:

A5 has the formula =1.023254546*10^3 which is displayed as 1023.25
=LEN(A5) resolves to 11

Neither of these make sense.

A7 shows 0
=LEN(A7) resolves to 1. This makes sense.

A9 shows 0.01
=LEN(A9) = 4. This makes sense.

Thoughts?

Dave
--
A hint to posters: Specific, detailed questions are more likely to be
answered than questions that provide no detail about your problem.


--

Dave Peterson

Marcelo

LEN function
 
Hi Dave,

it will not count the zeros right on the decimals eg

1000.000 = you just have zeros on the decimal it will return 4

1.00000000000001 = it will return 16

1.023254546*10^3 = 1023,2545460000000 it will return 11 because the last
decimal caracter different form zero is 6

hth
--
regards from Brazil
Thanks in advance for your feedback.
Marcelo



"Dave F" escreveu:

A3 shows 1000.000
=LEN(A3) resolves to 4

I see 8 characters.

Another oddity:

A5 has the formula =1.023254546*10^3 which is displayed as 1023.25
=LEN(A5) resolves to 11

Neither of these make sense.

A7 shows 0
=LEN(A7) resolves to 1. This makes sense.

A9 shows 0.01
=LEN(A9) = 4. This makes sense.

Thoughts?

Dave
--
A hint to posters: Specific, detailed questions are more likely to be
answered than questions that provide no detail about your problem.



All times are GMT +1. The time now is 09:25 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com