+ Reply to Thread
Results 1 to 5 of 5

Breaking up string to find max number

  1. #1
    Registered User
    Join Date
    07-22-2020
    Location
    London
    MS-Off Ver
    2010
    Posts
    15

    Breaking up string to find max number

    Hello All,

    I am trying to find the maximum number in a range by breaking up a string

    For example

    I have
    xxxxxxxx-01
    xxxxxxxx-02
    xxxxxxxx-03

    I would appreciate some assistance in arriving at a formula as everyone I create using Find or Right functions falls short!

    the answer to the above would be 03, the string will be of the same length each time.

    thanks

    Sarah

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Breaking up string to find max number

    This will work as an arrayed function (Must use CNTRL + SHFT + ENTER instead of ENTER)
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Registered User
    Join Date
    07-22-2020
    Location
    London
    MS-Off Ver
    2010
    Posts
    15

    Re: Breaking up string to find max number

    Quote Originally Posted by ChemistB View Post
    This will work as an arrayed function (Must use CNTRL + SHFT + ENTER instead of ENTER)
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Thanks for the reply!

    however, the numbers can increment in the thousands and wouldn't be limited to the last two digits.

    appreciate your help with this

  4. #4
    Forum Expert
    Join Date
    09-25-2015
    Location
    Milan Italy
    MS-Off Ver
    office 365
    Posts
    1,783

    Re: Breaking up string to find max number

    B1=aggregate(14,6,mid(a1:a100,search("-",a1:a100)+1,99)+0,1)

  5. #5
    Forum Guru
    Join Date
    04-23-2012
    Location
    New Jersey, USA
    MS-Off Ver
    Excel 365
    Posts
    2,416

    Re: Breaking up string to find max number

    Here is an array-entered** formula that should work...

    =MAX(0+TRIM(RIGHT(SUBSTITUTE(A1:A3,"-",REPT(" ",99)),99)))

    **Commit this formula using CTRL+SHIFT+ENTER and not just Enter by itself

    Note: Change the highlighted range to your actual range of values.

+ 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] Help in breaking down a text string
    By shina67 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-23-2020, 11:06 AM
  2. [SOLVED] Breaking up a long string
    By Wheelie686 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-27-2019, 03:25 AM
  3. Breaking up a long string
    By bitswit in forum Excel General
    Replies: 2
    Last Post: 11-23-2011, 05:19 AM
  4. Breaking a string at a character
    By ngoellner in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-28-2011, 10:41 AM
  5. Breaking data out of a string
    By jcarstens in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-02-2009, 11:35 AM
  6. Breaking up a string
    By EdMac in forum Excel General
    Replies: 11
    Last Post: 12-15-2006, 06:09 AM
  7. [SOLVED] Breaking up a string
    By jayceejay in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-13-2005, 05:05 AM

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