len()

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hi all,
please help finding the correct length!
A1=123 7 (note: in A1 there are 4 spaces between the 3 and the 7).
now the formula RIGHT(A1,4) will yield 7
in looking for the length of this result (the 7) suing the formula
LEN(RIGHT(A1,4)) this will produce 4, where i'm assuming to be 1 , similarly
if A1=123 78 then RIGHT(A1,5) is 78 and the LEN(RIGHT(A1,5)) will give 5
where i'm waiting to see 2
thanks for any help
 
The Right() function counts all characters, including spaces. If you request
5 characters you will get a length of 5.

If you want to return the length of the non-space characters try something
like:

=LEN(TRIM(RIGHT(A1,4)))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top