Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() 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 "64089" SGA3321R_IAREDROAD (BTL-3) 1177 975 - would return "975" 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: http://www.excelforum.com/member.php...info&userid=93 View this thread: http://www.excelforum.com/showthread...hreadid=497953 |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
With your data in A1, this formula will work given that "(BTL-3) 1177 " will
always precede the number that you want to return. =RIGHT(A1,(LEN(A1)-FIND("(BTL-3) ",A1)-12)) Hope this helps, Paul "wolfpack95" wrote in message ... 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 "64089" SGA3321R_IAREDROAD (BTL-3) 1177 975 - would return "975" 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: http://www.excelforum.com/member.php...info&userid=93 View this thread: http://www.excelforum.com/showthread...hreadid=497953 |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() Try: =LEFT(A1,FIND(" ",A1)-1) or in case there are no spaces in A1 =IF(ISERROR(LEFT(A1,FIND(" ",A1)-1)),A1,LEFT(A1,FIND(" ",A1)-1)) HTH JG -- pinmaster ------------------------------------------------------------------------ pinmaster's Profile: http://www.excelforum.com/member.php...fo&userid=6261 View this thread: http://www.excelforum.com/showthread...hreadid=497953 |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() Assuming that the text will never use the character "^", then use the following formula:- =RIGHT(A1,LEN(A1)-FIND("^",SUBSTITUTE(A1," ","^",LEN(A1)-LEN(SUBSTITUTE(A1," ",""))),1)) If "^" is used replace it with a character that will never appear e.g. ¬ or ¦ -- Gary Brown ------------------------------------------------------------------------ Gary Brown's Profile: http://www.excelforum.com/member.php...o&userid=17084 View this thread: http://www.excelforum.com/showthread...hreadid=497953 |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
And....another way for when there may be more than 1 space:
A1: (some text) B1: =RIGHT(A1,MATCH(" ",MID(A1,LEN(A1)+1-ROW(INDIRECT("1:"&(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-Pro "wolfpack95" wrote: 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 "64089" SGA3321R_IAREDROAD (BTL-3) 1177 975 - would return "975" 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: http://www.excelforum.com/member.php...info&userid=93 View this thread: http://www.excelforum.com/showthread...hreadid=497953 |
#6
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() Thanks for all the replies. Ron Coderre's formula does what I need. -- wolfpack95 ------------------------------------------------------------------------ wolfpack95's Profile: http://www.excelforum.com/member.php...info&userid=93 View this thread: http://www.excelforum.com/showthread...hreadid=497953 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
removing a space from starting of the text | Excel Worksheet Functions | |||
Read Text File into Excel Using VBA | Excel Discussion (Misc queries) |