+ Reply to Thread
Results 1 to 4 of 4

Extract Numbers from the Middle of a Field

  1. #1
    Registered User
    Join Date
    09-18-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    46

    Red face Extract Numbers from the Middle of a Field

    I have a series of numbers in a column such as:

    SR07-9879A
    PCK MC79-2863B
    RTN PP24-3894A
    VA62-8933A1

    I want to put a formula into another column which will return only the 2 digits left of the dash through the four digits after the dash:

    07-9879
    79-2863
    24-3894
    62-8933

    I also need a column which will return only the letters before the space at the beginning (if any, see the "PCK" & "RTN" in the first list) and a column which will only return anything after the four digits after the dash (if any, results from the first list would be A, B, A, A1).

    Please help! Thank you!

  2. #2
    Forum Expert
    Join Date
    02-22-2013
    Location
    London, UK
    MS-Off Ver
    Office 365
    Posts
    1,218

    Re: Extract Numbers from the Middle of a Field

    Try in cell A1,

    =LEFT(REPLACE(A1,1,FIND("-",A1)-3,""),7)

    and copy down.

    Regards,
    berlan

  3. #3
    Forum Expert
    Join Date
    02-22-2013
    Location
    London, UK
    MS-Off Ver
    Office 365
    Posts
    1,218

    Re: Extract Numbers from the Middle of a Field

    and as for the other 2 columns;

    I also need a column which will return only the letters before the space at the beginning (if any, see the "PCK" & "RTN" in the first list)
    =IF(ISNUMBER(FIND(" ",A1)),LEFT(A1,FIND(" ",A1)-1),"")


    a column which will only return anything after the four digits after the dash (if any, results from the first list would be A, B, A, A1).
    =IFERROR(MID(REPLACE(A1,1,FIND("-",A1)-3,""),8,255),"")

  4. #4
    Registered User
    Join Date
    09-18-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    46

    Re: Extract Numbers from the Middle of a Field

    Thank you SO much, berlan! All three worked perfectly!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] FORMULA to Extract Specific Numbers in a text field
    By Joshdm0716 in forum Excel Formulas & Functions
    Replies: 17
    Last Post: 08-14-2013, 12:17 PM
  2. Delete text in middle of field
    By Beckl46 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-26-2013, 09:32 AM
  3. Replies: 11
    Last Post: 12-17-2012, 12:02 PM
  4. How can I get data in middle of a field
    By RDMRDM in forum Excel General
    Replies: 1
    Last Post: 06-30-2009, 03:38 PM
  5. [SOLVED] Extract only numbers from an alphanumeric field in Excel?
    By Brian in forum Excel General
    Replies: 2
    Last Post: 04-03-2006, 03:00 PM
  6. Extract 1st name & middle initial
    By mikeburg in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-07-2006, 06:50 PM
  7. [SOLVED] Extract sub-string of number from field of long series of numbers
    By ExcelExtrator in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-27-2005, 07:00 PM
  8. Extract middle initial
    By rocket0612 in forum Excel General
    Replies: 4
    Last Post: 07-05-2005, 04:05 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1