View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default Search for number after specific text in string

Hi,

There are several ways of doing this so lets start with these

=MID(A1,MIN(FIND({0,1,2,3,4,5,6,7,8,9},A1&"0123456 789")),LEN(A1))

or

=LOOKUP(99^99,--("0"&MID(A1,MIN(SEARCH({0,1,2,3,4,5,6,7,8,9},A1&"0 123456789")),ROW($1:$10000))))

Mike



"AMH" wrote:

I want to search for a number after a specific piece of text in a string, the
number can be 1 to 4 characters in length and will finish with either a comma
or a space, format like this :

.mpp\????, or .mpp\???? (with the question marks being numeric between 1
and 9999)

Any help would be much appreciated