Extracting last set of numbers from string

  • Hi,


    I am trying to figure out on how to extract the last set of numbers from the string but not sure how.


    String:
    abc123qwe456zxc
    okj99989 bnmmn 888yyy


    Results:
    456
    888


    Can you help? I am trying to avoid using VBA for this case.


    Appreciate your help.


    Thanks

  • Hi,


    Based on your string structure, you should test


    Code
    =LEFT(RIGHT(A2,6),3)


    Hope this will help

    If you feel like saying "Thank You" for the help received, do not hesitate to click the "Thumbs Up" icon, below, in the bottom right corner:)

  • Thanks Carim for your reply.


    What if the alphabet count at the end of the string varies? e.g. abc 123qwe456qweqwe to get result of 456.


    Thanks

  • The sample data as below.
    I wish to extract the length data from the dimension description. The length of the alphabet after the last set of numbers at the end varies.
    [TABLE="border: 1, cellpadding: 1, width: 500"]

    [tr]


    [td]

    Dimension (width x length)

    [/td]


    [td]

    Length (Results needed)

    [/td]


    [/tr]


    [tr]


    [td]

    300MM x 400M EXP

    [/td]


    [td]

    400

    [/td]


    [/tr]


    [tr]


    [td]

    250MM x 1000YDS EXP

    [/td]


    [td]

    1000

    [/td]


    [/tr]


    [tr]


    [td]

    500IN x 250 FT (XYZ)

    [/td]


    [td]

    250

    [/td]


    [/tr]


    [/TABLE]

  • Thanks for the file ...


    Here is the formula :


    Code
    =TRIM(MID(A1,FIND("x",A1)+1,MAX(IFERROR(FIND({1,2,3,4,5,6,7,8,9,0},A1,ROW(INDIRECT("1:"&LEN(A1)))),0))-FIND("x",A1)))*1

    If you feel like saying "Thank You" for the help received, do not hesitate to click the "Thumbs Up" icon, below, in the bottom right corner:)

  • Sorry ... just realized I forgot to mention it was an Array Formula ...?( ( for future readers ...)

    If you feel like saying "Thank You" for the help received, do not hesitate to click the "Thumbs Up" icon, below, in the bottom right corner:)

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!