views:

358

answers:

1

Is there a way using a cell formula in Excel to find the index of the first non-alpha character in a referenced cell?

I've imported data into Excel which has a column that looks like this:

<some text I don't want in the derived cell><some text that prepends the text I want and is always constant>TheTextIWant<Some non-alpha character><some other characters that may be alpha or not>

I'm trying to create a formula that so far looks like this:

=MID(<cell reference>, SEARCH("<prepended text>, <cell reference>) + <length of prepended text>, ??)

Where ?? is some sub-formula that finds the first non-alpha character after "TheTextIWant"

Is this possible?

A: 

On this page there is an array formula for finding the "Position Of First Digit In A String." You should be able to modify that to use the 'T' function (to determine if a character is text), incorporate a little subtraction and then get to what you're looking for.

Jacob G
Thanks I will try to take a look at this this weekend. -rp
Ron Pihlgren
I'm having a hard time wrapping my head around array formulas as described in the article. More study is needed...
Ron Pihlgren