+ Reply to Thread
Results 1 to 5 of 5

MIN MAX value separated by dash

  1. #1
    Valued Forum Contributor sans's Avatar
    Join Date
    10-19-2011
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    550

    MIN MAX value separated by dash

    Hello,

    I'd like to find the min & max value of a cell where values are separated by dash, for example, 1-2-5-6-7-19-0. I tried using the LEN function but haven't managed to get the correct result.

    Thank you, Sans

  2. #2
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: MIN MAX value separated by dash

    How about this little user-defined function:

    Please Login or Register  to view this content.
    Then, with your data in cell A1:

    =SplitString(A1,"MAX")

    or

    =SplitString(A1,"MIN")

  3. #3
    Valued Forum Contributor sans's Avatar
    Join Date
    10-19-2011
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    550

    Re: MIN MAX value separated by dash

    Excellent, Andrew! Thank you very much, it worked great! This way I can get min and max values between many cells easily as well, i.e. =SplitString(A1&C1&H1,"MAX")

    Many thanks, Sans

  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: MIN MAX value separated by dash

    Just for fun, select from the drop-down in this workbook, no VBa.

    Add to the strings as required, the column can be any length.
    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.

  5. #5
    Valued Forum Contributor sans's Avatar
    Join Date
    10-19-2011
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    550

    Re: MIN MAX value separated by dash

    Thanks Marcol!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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