+ Reply to Thread
Results 1 to 8 of 8

Extract middle numbers

  1. #1
    Forum Contributor
    Join Date
    12-22-2012
    Location
    Asia
    MS-Off Ver
    Microsoft 365
    Posts
    234

    Extract middle numbers

    Hi

    I have a string of numbers that look like this.
    Apr 1 2019
    Apr 2 2019
    Apr 3 2019
    Apr 4 2019
    Apr 7 2019
    Apr 8 2019
    Apr 9 2019
    Apr 10 2019
    Apr 11 2019
    Apr 14 2019
    Apr 15 2019
    Apr 16 2019
    Apr 17 2019
    Apr 18 2019
    Apr 21 2019
    Apr 22 2019
    Apr 23 2019
    Apr 24 2019
    Apr 25 2019
    Apr 28 2019
    Apr 29 2019
    Apr 30 2019

    May I know the formula to extract the middle digits i.e. the day of the month?

    thanks

  2. #2
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,873

    Re: Extract middle numbers

    If it is a Text String, this should work

    =MID(A1,FIND(" ",A1)+1,FIND(" ",A1,FIND(" ",A1)+1)-FIND(" ",A1)-1)

    If it is a date formated that way, then the below should work

    =DAY(A1)
    Cheers!
    Deep Dave

  3. #3
    Forum Contributor
    Join Date
    12-22-2012
    Location
    Asia
    MS-Off Ver
    Microsoft 365
    Posts
    234

    Re: Extract middle numbers

    Thanks. When it comes to Apr 1 2019, the result is blank and not "1".

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Extract middle numbers

    Or just this...
    =--MID(A1,5,2)
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  5. #5
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,873

    Re: Extract middle numbers

    Quote Originally Posted by L.LEE View Post
    Thanks. When it comes to Apr 1 2019, the result is blank and not "1".
    Well it works for me.

  6. #6
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,873

    Re: Extract middle numbers

    Quote Originally Posted by FDibbins View Post
    Or just this...
    =--MID(A1,5,2)
    Why did I not think of that Haha!

  7. #7
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Extract middle numbers

    Quote Originally Posted by NeedForExcel View Post
    Why did I not think of that Haha!
    thats why I get paid the big bucks (NOT!!!)
    lol

    (thanks for the feedback )

  8. #8
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Extract middle numbers

    L.LEE, happy to help and thanks for the feedback

+ 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] Extract Text in middle
    By wongsiuon in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 08-18-2019, 01:13 PM
  2. Extract middle name or last name
    By [email protected] in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-22-2019, 05:27 AM
  3. Extract Middle Name
    By roshan03 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-24-2019, 07:22 AM
  4. [SOLVED] Extract text from the middle
    By jackson_hollon in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 12-21-2016, 03:23 PM
  5. Formula to extract middle name
    By papacico in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 11-07-2016, 04:17 AM
  6. [SOLVED] Extract Numbers from the Middle of a Field
    By cpalmer72 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-19-2015, 02:22 PM
  7. Extract 1st name & middle initial
    By mikeburg in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-07-2006, 06:50 PM

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