excel / vba - I want text from string until number

  Heefie 11:05 31 Dec 2004
Locked

I know I can do this in a long-winded way, with a few lefts and rights and len statements, I'm just wondering if there's a shorter way ...

I have a number of records that begin with a character string & end with a number, as in :

ABC6


ABCDEFG9


ABCD23


ABCDEFGHI6


... is there a simple expression / formula that I can use to extract JUST the Alpha string from the start ?!?!

Cheers in advance for any help ...

  pc moron 16:38 31 Dec 2004

This does the job:

=LEFT(A1,MIN(IF(ISNUMBER(FIND({1,2,3,4,5,6,7,8,9,0},A1)),FIND({1,2,3,4,5,6,7,8,9,0},A1)))-1)

For ref 6th post here click here

  Heefie 01:32 01 Jan 2005

That works fine, but I needed it to work in VBA, so I've sorted it now ...

This thread is now locked and can not be replied to.

Elsewhere on IDG sites

WPA2 hack: How secure is your Wi-Fi?

HP’s new Surface Pro rival is designed specifically for Adobe-using designers and artists

Best kids apps for iPhone & iPad

Que faire si son iPhone ou iPad est tombé dans de l'eau ?