hi all,
what would be the formula if you want to extract a variable length text located at the end of a string. for example the text can be "SE' or "wed" or "dawn".
TIA
hi all,
what would be the formula if you want to extract a variable length text located at the end of a string. for example the text can be "SE' or "wed" or "dawn".
TIA
Last edited by dubdub; 2012-05-23 at 02:12.
TIA
dubdub

This month, every Windows Secrets subscriber can download a one-chapter excerpt of Windows 7: The Missing Manual.Windows 7: The Missing Manual provides valuable information to help you overcome these difficulties in learning a new operating system. Subscribe today to download your free excerpt.
the string has variable length and the text is always at the end of the string.
TIA
TIA
dubdub
I presume the end substring is after a final space in the string. How about a formula like:
=IF(LEN(A1)=LEN(SUBSTITUTE(A1," ","")),A1,MID(A1,FIND(CHAR(1),SUBSTITUTE(A1," ",CHAR(1),(LEN(A1)-LEN(SUBSTITUTE(A1," ","")))))+1,LEN(A1)))
Steve
Assume i want to extract the exact text,"SE' or "wed" or "dawn", in the string and these text are at the end.
TIA
TIA
dubdub
Hi
To extract x characters from the end of a text string, the formula is
=RIGHT(string, x)
So, if you know how many characters you want to extract, this formula is simple.
If you want to know whether a particular string ends with 'SE', 'wed', or 'dawn', you could test for this with an IF(..) formula.
zeddy
Any suggestion(s) for a nested right function with if(..) for these specific text(s) in a string.
TIA
TIA
dubdub
Any suggestion(s) for a nested right function with if(..) for these specific text(s) in a string.
TIA
TIA
dubdub
=IF(RIGHT(A1,2)="SE","SE",IF(RIGHT(A1,3)="wed","we d",IF(RIGHT(A1,4)="dawn","dawn","something else")))
Steve
Thanks to you all, and special Thanks to Steve.
dubdub
TIA
dubdub