Find numeric value at end of string
If there will be NO other numbers in the string, try something like this:
For text in A1
B1:
=MID(A1,MIN(SEARCH({0,1,2,3,4,5,6,7,8,9},A1&"01234 56789")),SUMPRODUCT(--ISNUMBER(--MID(A1,ROW(INDEX($A:$A,1,1):INDEX($A:$A,LEN(A1),1) ),1))))
Example:
For A1: C:\Documents and Settings\me\[test 2-2006.xls]Sheet1
That formula returns 2-2006
Does that help?
***********
Regards,
Ron
XL2002, WinXP-Pro
"Barb Reinhardt" wrote:
Let's say I have a string that looks like this
C:\Documents and Settings\me\[test 2-2006.xls]Sheet1
I want to extract the DATE prior to .xls. I can get to this:
C:\Documents and Settings\me\[test 2-2006
It is possible that the filename would have numbers in it prior to the date.
I'm trying to figure out a way to get to the last SPACE in the string. Any
suggestions?
Thanks,
Barb Reinhardt
|