Is there a function to read values starting from the right of a cell and
pulling characters until I reach a space?
Two examples:
SGA3220R_IAOAKTREE (BTL-3) 1177 64089 - would return quot;64089quot;
SGA3321R_IAREDROAD (BTL-3) 1177 975 - would return quot;975quot;
I know I could do a Text to Columns with a space delimiter but was
hoping to find something easier. Thanks in advance for any help.--
wolfpack95
------------------------------------------------------------------------
wolfpack95's Profile: www.excelforum.com/member.php...infoamp;userid=93
View this thread: www.excelforum.com/showthread...hreadid=497953With your data in A1, this formula will work given that quot;(BTL-3) 1177 quot; will
always precede the number that you want to return.
=RIGHT(A1,(LEN(A1)-FIND(quot;(BTL-3) quot;,A1)-12))
Hope this helps,
Paul
quot;wolfpack95quot; gt; wrote
in message ...
gt;
gt; Is there a function to read values starting from the right of a cell and
gt; pulling characters until I reach a space?
gt;
gt; Two examples:
gt; SGA3220R_IAOAKTREE (BTL-3) 1177 64089 - would return quot;64089quot;
gt; SGA3321R_IAREDROAD (BTL-3) 1177 975 - would return quot;975quot;
gt;
gt; I know I could do a Text to Columns with a space delimiter but was
gt; hoping to find something easier. Thanks in advance for any help.
gt;
gt;
gt; --
gt; wolfpack95
gt; ------------------------------------------------------------------------
gt; wolfpack95's Profile:
gt; www.excelforum.com/member.php...infoamp;userid=93
gt; View this thread: www.excelforum.com/showthread...hreadid=497953
gt;
Try:
=LEFT(A1,FIND(quot; quot;,A1)-1)
or
in case there are no spaces in A1
=IF(ISERROR(LEFT(A1,FIND(quot; quot;,A1)-1)),A1,LEFT(A1,FIND(quot; quot;,A1)-1))
HTH
JG--
pinmaster
------------------------------------------------------------------------
pinmaster's Profile: www.excelforum.com/member.php...foamp;userid=6261
View this thread: www.excelforum.com/showthread...hreadid=497953
Assuming that the text will never use the character quot;^quot;, then use the
following formula:-
=RIGHT(A1,LEN(A1)-FIND(quot;^quot;,SUBSTITUTE(A1,quot;
quot;,quot;^quot;,LEN(A1)-LEN(SUBSTITUTE(A1,quot; quot;,quot;quot;))),1))
If quot;^quot; is used replace it with a character that will never appear e.g.
¬ or ¦--
Gary Brown
------------------------------------------------------------------------
Gary Brown's Profile: www.excelforum.com/member.php...oamp;userid=17084
View this thread: www.excelforum.com/showthread...hreadid=497953And....another way for when there may be more than 1 space:
A1: (some text)
B1: =RIGHT(A1,MATCH(quot;
quot;,MID(A1,LEN(A1) 1-ROW(INDIRECT(quot;1:quot;amp;(LEN(A1)))),1),0)-1)
Note: Commit that array formula by holding down [Ctrl] [Shift] when you
press [enter]Does that help?
***********
Regards,
Ron
XL2002, WinXP-Proquot;wolfpack95quot; wrote:
gt;
gt; Is there a function to read values starting from the right of a cell and
gt; pulling characters until I reach a space?
gt;
gt; Two examples:
gt; SGA3220R_IAOAKTREE (BTL-3) 1177 64089 - would return quot;64089quot;
gt; SGA3321R_IAREDROAD (BTL-3) 1177 975 - would return quot;975quot;
gt;
gt; I know I could do a Text to Columns with a space delimiter but was
gt; hoping to find something easier. Thanks in advance for any help.
gt;
gt;
gt; --
gt; wolfpack95
gt; ------------------------------------------------------------------------
gt; wolfpack95's Profile: www.excelforum.com/member.php...infoamp;userid=93
gt; View this thread: www.excelforum.com/showthread...hreadid=497953
gt;
gt;
Thanks for all the replies. Ron Coderre's formula does what I need.--
wolfpack95
------------------------------------------------------------------------
wolfpack95's Profile: www.excelforum.com/member.php...infoamp;userid=93
View this thread: www.excelforum.com/showthread...hreadid=497953
- May 27 Tue 2008 20:44
read characters starting from the right until a space is reached
close
全站熱搜
留言列表
發表留言
留言列表

