I use XL97 and Windows 2000. Try this:
In cell A1, put 13547.
In cell B1, put =LEN(A1). It returns 5, which I would expect.
In cell C1, put =RIGHT(A1,LEN(A1-2)). This returns 13547, which I would
NOT expect.
Why doesn't it return 547?
It's a misplaced parenthesis. Try
=RIGHT(A1,LEN(A1)-2)
JamesTry this: =RIGHT(A1,LEN(A1)-2)
you need to put the -2 outside of the LEN bracketquot;Brianquot; wrote:
gt; I use XL97 and Windows 2000. Try this:
gt;
gt; In cell A1, put 13547.
gt; In cell B1, put =LEN(A1). It returns 5, which I would expect.
gt; In cell C1, put =RIGHT(A1,LEN(A1-2)). This returns 13547, which I would
gt; NOT expect.
gt;
gt; Why doesn't it return 547?
gt;
It's all about brackets!
Try this..
=RIGHT(A1,(LEN(A1)-2))
Colin--
Colin Vicary
------------------------------------------------------------------------
Colin Vicary's Profile: www.excelforum.com/member.php...oamp;userid=10472
View this thread: www.excelforum.com/showthread...hreadid=543789Wouldn't you want
=RIGHT(A1,LEN(A1)-2).
quot;Brianquot; wrote:
gt; I use XL97 and Windows 2000. Try this:
gt;
gt; In cell A1, put 13547.
gt; In cell B1, put =LEN(A1). It returns 5, which I would expect.
gt; In cell C1, put =RIGHT(A1,LEN(A1-2)). This returns 13547, which I would
gt; NOT expect.
gt;
gt; Why doesn't it return 547?
gt;
Zone wrote:
gt; It's a misplaced parenthesis. Try
gt; =RIGHT(A1,LEN(A1)-2)
gt; James
gt;
Thanks to everybody. This is my Homer Simpson moment for today (I hope).
- Oct 05 Fri 2007 20:40
LEN function in XL97
close
全站熱搜
留言列表
發表留言