+ Reply to Thread
Results 1 to 11 of 11

Match string and find the maximum value

  1. #1
    Registered User
    Join Date
    08-06-2012
    Location
    Australia
    MS-Off Ver
    Excel 2003
    Posts
    5

    Question Match string and find the maximum value

    Hi

    Please help, I'm looking for a formula that can return the max values contain RTS ranges from B1:D1. The result in cell A1 should show RTS-2123 as the max value.
    ----A-----B-----------C------------D
    1---???---RTS-1012--- RTS-902--- RTS-2123

    Thanks

  2. #2
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Match string and find the maximum value

    Try..these array formulae. Confirm with Ctrl+Shift+Enter and not just Enter

    ="RTS-"&MAX(SUBSTITUTE(B1:D1,"RTS-","")*1)

    or

    ="RTS-"&MAX(RIGHT(B1:D1,LEN(B1:D1)-4)*1)
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  3. #3
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Match string and find the maximum value

    Try this array formula, confirm with Ctrl+Shift+Enter not just enter
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

  4. #4
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Match string and find the maximum value

    Possibly better to use either of these non-array formulae
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Or maybe this to allow for any prefix
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by Marcol; 08-06-2012 at 09:48 AM. Reason: Added another possibility

  5. #5
    Registered User
    Join Date
    08-06-2012
    Location
    Australia
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Match string and find the maximum value

    It work Thank you so much

  6. #6
    Registered User
    Join Date
    08-06-2012
    Location
    Australia
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Match string and find the maximum value

    Sorry but need your help again and I hope you can solve this problems. Need to return Maximum value of RTS. The result should show in A1 is RTS-2123 12-Feb-2012

    ------A------ B--------------------------C-------------------------D---------------------
    1-----???---- RTS-1012 10-June-2011 ----RTS-902 12-Oct-2012-----RTS-2123 12-Feb-2012

  7. #7
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Match string and find the maximum value

    Tweaking Marcol's formual above..

    =INDEX(B2:D2,0,MATCH("*"&MAX(INDEX(MID(B2:D2,FIND("-",B2:D2)+1,FIND(" ",B2:D2)-4)*1,1,))&"*",B2:D2,0))

  8. #8
    Registered User
    Join Date
    08-06-2012
    Location
    Australia
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Match string and find the maximum value

    Thanks you

  9. #9
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Match string and find the maximum value

    If you are satisfied with the solution(s) provided, please remember to mark your thread as Solved.

    New quick method:
    Select Thread Tools (above first post on page) -> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word "Title" you will see a dropdown with the words "No prefix".
    Change to "Solved"
    Click Save

    Also, as a new member of the forum, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

  10. #10
    Registered User
    Join Date
    08-06-2012
    Location
    Australia
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Match string and find the maximum value

    I've another problem, I can't seem work this out. I hope you can help me.
    See the excel attached. Many Thanks Book1.xlsx

  11. #11
    Forum Contributor CheshireCat's Avatar
    Join Date
    10-11-2011
    Location
    Victoria, Canada
    MS-Off Ver
    Excel 2003 & 2010
    Posts
    258

    Re: Match string and find the maximum value

    Spaces and errors just complicate things. In this case, you're back to an array formula. Try this:

    Please Login or Register  to view this content.
    Confirm with Ctrl+Shift+Enter not just enter.
    Docendo discimus.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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