+ Reply to Thread
Results 1 to 4 of 4

extract number after second dash

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

    extract number after second dash

    Hi

    I have numbers in this format which is not formatted as a date.
    11/06/2018

    Could you pls help me with the formula to extract the numbers (i.e. 2018) after the second dash?

    thanks

  2. #2
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: extract number after second dash

    Try

    =RIGHT(A2,4)+0

  3. #3
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: extract number after second dash

    Thanks for the rep!

  4. #4
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MSO Home and Business 2024
    Posts
    7,343

    Re: extract number after second dash

    What if the length isn't always 4 digits ?
    PHP Code: 
    =RIGHT(A1,LEN(A1)-FIND(CHAR(160),SUBSTITUTE(A1,"/",CHAR(160),2))) 
    Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
    You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.

+ 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] Add a Dash to a Number
    By woodsedge in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-12-2018, 07:31 PM
  2. [SOLVED] extract number after dash
    By L.LEE in forum Excel General
    Replies: 2
    Last Post: 10-12-2018, 12:35 AM
  3. Replies: 4
    Last Post: 08-01-2018, 12:27 PM
  4. [SOLVED] How two extract text behind last dash"-" from multiple dash "-" containing text?
    By nabinprd1 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-01-2018, 12:16 PM
  5. [SOLVED] extract text after second dash
    By L.LEE in forum Excel General
    Replies: 3
    Last Post: 06-03-2018, 03:25 AM
  6. Extract Text after hypen or dash
    By MarkO'Donnell in forum Excel General
    Replies: 1
    Last Post: 11-06-2017, 08:35 PM
  7. Replies: 11
    Last Post: 12-17-2012, 12:02 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