Home |
Search |
Today's Posts |
#15
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
On Thu, 1 Mar 2007 13:43:00 -0800, IPerlovsky
wrote: Okay. I got one that works for all strings in the set: =TRIM(IF(OR(RIGHT(B2,2)=" Y",RIGHT(B2,2)=" N",ISNUMBER(RIGHT(B2,1)*1)=TRUE),"",TEXTREVERSE(L EFT(TEXTREVERSE(B2),REGEX.FIND(TEXTREVERSE(B2),"\s N\s|\sY\s|\d",1)-1)))) Ah, TEXTREVERSE................... 2/26/2007 LA 988844-CN ZACHARY LA CMNTY SC 1000000 4 3/1/2008 CIFG 100.311 3.64 3.59 5 Y AAA N with your formula above gives: AAA N On the other hand, this modification of my previous seems to work on all the examples you've posted: =IF(REGEX.COMP(A1,"([\s\S]+)\s(N|[-+]?\d*\.?\d+)(\s|$)([A-Z\d\s]*$)"), REGEX.SUBSTITUTE(A1,"([\s\S]+)\s(N|[-+]?\d*\.?\d+)(\s|$)([A-Z\d\s]*$)","[4]"),"") --ron |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Extracting a numbers from a text string | Excel Worksheet Functions | |||
Extracting Info From Within A Text String | Excel Worksheet Functions | |||
Extracting a word from a text string | Excel Discussion (Misc queries) | |||
Extracting a number in a text string | Excel Worksheet Functions | |||
Extracting from a text string | Excel Worksheet Functions |