#1
|
|||
|
|||
Extract Numbers from Alphanumeric String
Hi All
I am looking for a formula that will extract the first number from an alphanumeric string that may have more than one number contained inside the string. For example I want to be able to extract "360" only from the following alphanumeric string: 360FS+6wks Any help would be appreciated. Tony |
#2
|
||||
|
||||
Hi Tony,
Is there any consistency in the data, such a the '+'?
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
Hi Macropod
Unfortunately not. The varying examples are as follows: 2FS+3 wks 22FS+3 wks 222FS+3 wks etc Tony |
#4
|
||||
|
||||
Hi Tony,
Your reply suggests all the data do have a '+' and, apparently, a 'F' immediately after the number. Is either of these so?
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#5
|
|||
|
|||
Hi Macropod
Each entry may either have an "+" or a "-" and it will either be an F or an S. |
#6
|
||||
|
||||
If the number is always immediately followed by an "F" or an "S", then you could use this formula:
Code:
=LEFT(A1,MIN(SEARCH({"F","S"},A1&"FS")-1)) |
#7
|
|||
|
|||
Quote:
Brilliant. It works fine (better than the formula I used that tok me about 2 hours to work out :-)). Thanks for your help. Tony |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to extract only numbers from a STRING? | Learner7 | Excel | 3 | 07-02-2013 06:25 AM |
Can't See Attachments When E-mail String is Saved to PDF | wineattorney | Outlook | 1 | 03-29-2011 02:15 AM |
Extract numbers from a text string | aleale97 | Excel | 4 | 02-10-2011 10:33 AM |
inserting a string of data into an MS Word table??? | matto | Word VBA | 0 | 07-16-2010 09:35 AM |
Extract from String using Wildcard | whousedmy | Word | 0 | 05-21-2009 01:35 AM |