+ Reply to Thread
Results 1 to 25 of 25

Formula like MAX to find the highest value (contains text and numbers)

  1. #1
    Registered User
    Join Date
    05-13-2013
    Location
    Southampton,England
    MS-Off Ver
    Excel 2007
    Posts
    35

    Formula like MAX to find the highest value (contains text and numbers)

    Hi all,
    In column B I have numbers as such:
    PUW-00001
    PUW-00001
    PUW-00002
    PUW-00002
    PUW-00003


    I would like to have a formula at the top of the spreadsheet to tell me which number has been done last so I could enter it for my new documents without looking up and finding it manually. In this example it would be PUW-00003

    If I do the simple MAX formula, it just displays 0 ( I guess due to text)

    Is there a way around this?

    Thank you!

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,592

    Re: Formula like MAX to find the highest value (contains text and numbers)

    Use this:

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    05-13-2013
    Location
    Southampton,England
    MS-Off Ver
    Excel 2007
    Posts
    35

    Re: Formula like MAX to find the highest value (contains text and numbers)

    Thank you!
    Worked great with 1 small issue:
    If value in B5 is 20
    If I put B6 as 21 it will show 21..
    If I put B4 as 21 it will not update... is there a way around it? I don't need it to make decisions where from, just need the highest number from the whole column

  4. #4
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: Formula like MAX to find the highest value (contains text and numbers)

    zbor's formula will return the last number in the column, not the MAX.

    Maybe use a helper column in column C

    in C1
    =RIGHT(B1,5)+0

    Then

    =MAX(C1:C10000)
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  5. #5
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,592

    Re: Formula like MAX to find the highest value (contains text and numbers)

    It find last number in the field as it was in your example.

    But if they are not in ascending order then this will return you MAX value only last 5 digits must be numbers (as per example):

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Confirm formula with ctrl+shift+enter (not just enter)

  6. #6
    Registered User
    Join Date
    05-13-2013
    Location
    Southampton,England
    MS-Off Ver
    Excel 2007
    Posts
    35

    Re: Formula like MAX to find the highest value (contains text and numbers)

    Thank you - special K but it's an old document where I cant afford to add more columns on the side so just need 1 block to show me the last biggest number so I could type in the next number without looking up all the time.

    zbor- some amazing help from you, really appreciate it... Sadly this formula doesn't work ( I edited it to =MAX(IFERROR(--RIGHT($B$2:$B$1000,5),0)) but it comes up with 0, with the previous one it properly showed the whole name

  7. #7
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,592

    Re: Formula like MAX to find the highest value (contains text and numbers)

    Did you confirm formula with ctrl+shift+enter?

    Formula confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER.

    You will know the array is active when you see curly braces { } appear around your formula (you can't enter those brackets manually).

    If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer.

  8. #8
    Registered User
    Join Date
    05-13-2013
    Location
    Southampton,England
    MS-Off Ver
    Excel 2007
    Posts
    35

    Re: Formula like MAX to find the highest value (contains text and numbers)

    I did, the braces appeared, but the result is 0 ;/

  9. #9
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,592

    Re: Formula like MAX to find the highest value (contains text and numbers)

    Do you have 5 characters at the end because if all data returns error then result is 0.

    PUW-3 result: 0
    PUW-03 result: 0
    PUW-003 result: 0
    PUW-0003 result: 0
    PUW-00003 result: 3
    PUW-000003 result: 3
    PUW-0000003 result: 3

  10. #10
    Registered User
    Join Date
    05-13-2013
    Location
    Southampton,England
    MS-Off Ver
    Excel 2007
    Posts
    35

    Re: Formula like MAX to find the highest value (contains text and numbers)

    all are in the same format of -
    PUW-00006
    PUW-00007
    PUW-00008
    PUW-00009
    PUW-00010
    PUW-00011
    PUW-00012
    PUW-00013
    PUW-00014

  11. #11
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,592

    Re: Formula like MAX to find the highest value (contains text and numbers)

    Space at the end?
    Attach a sample workbook.

    Delete all other relevant data.

  12. #12
    Registered User
    Join Date
    05-13-2013
    Location
    Southampton,England
    MS-Off Ver
    Excel 2007
    Posts
    35

    Re: Formula like MAX to find the highest value (contains text and numbers)

    file attached
    Attached Files Attached Files

  13. #13
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Formula like MAX to find the highest value (contains text and numbers)

    Maybe this array formula**:

    =MAX(IFERROR(--MID(B3:B25,5,15),0))

    ** array formulas need to be entered using the key
    combination of CTRL,SHIFT,ENTER (not just ENTER).
    Hold down both the CTRL key and the SHIFT key
    then hit ENTER.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  14. #14
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,592

    Re: Formula like MAX to find the highest value (contains text and numbers)

    Than can do the trick too.

    But formula above works in this example:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Returns 5

  15. #15
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Formula like MAX to find the highest value (contains text and numbers)

    Enter this array formula in cell B2. This will return a text string with a highest number.
    Please see attached file.
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Or a little bit shorter
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    ***Array formula
    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER.
    You will know the array is active when you see curly braces { } appear around your formula.
    If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer.
    Attached Files Attached Files
    Last edited by AlKey; 09-05-2016 at 11:08 AM.
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  16. #16
    Registered User
    Join Date
    05-13-2013
    Location
    Southampton,England
    MS-Off Ver
    Excel 2007
    Posts
    35

    Re: Formula like MAX to find the highest value (contains text and numbers)

    =INDEX(B3:B100,MATCH("*"&(TEXT(MAX(IFERROR(--RIGHT(B3:B$100,5),0)),"00000")),B$3:B$100,0)) this worked when I changed B100 to B10000 :>

    Great!! Thank you all! this forum is legendary!

  17. #17
    Registered User
    Join Date
    05-13-2013
    Location
    Southampton,England
    MS-Off Ver
    Excel 2007
    Posts
    35

    Re: Formula like MAX to find the highest value (contains text and numbers)

    ah damn, I've seen that I have another worksheet which has more numbers.....

    how to make this formula
    =INDEX(B3:B100,MATCH("*"&(TEXT(MAX(IFERROR(--RIGHT(B3:B$100,5),0)),"00000")),B$3:B$100,0))

    Check the main worksheet and the second worksheet as well? ;/ (becoming slight rocket science :D )

  18. #18
    Registered User
    Join Date
    05-13-2013
    Location
    Southampton,England
    MS-Off Ver
    Excel 2007
    Posts
    35

    Re: Formula like MAX to find the highest value (contains text and numbers)

    anyone? ;/ (example attached)
    Attached Files Attached Files
    Last edited by Nero_slk; 09-07-2016 at 02:14 AM.

  19. #19
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,984

    Re: Formula like MAX to find the highest value (contains text and numbers)

    You cannot have tried all the solutions, as this works for you (Tony Valko, above):

    =MAX(IFERROR(--MID($B$3:$B$17,5,15),0))
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  20. #20
    Registered User
    Join Date
    05-13-2013
    Location
    Southampton,England
    MS-Off Ver
    Excel 2007
    Posts
    35

    Re: Formula like MAX to find the highest value (contains text and numbers)

    The formulas above work.


    sadly after getting the formulas to work I found out that the spreadsheet has a few work sheets which have more numbers so I need the foruma to compare a few worksheets aswell

  21. #21
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,984

    Re: Formula like MAX to find the highest value (contains text and numbers)

    So, what to you mean; do you want the formulae to assess over more than 1 sheet and return the maximum?

  22. #22
    Registered User
    Join Date
    05-13-2013
    Location
    Southampton,England
    MS-Off Ver
    Excel 2007
    Posts
    35

    Re: Formula like MAX to find the highest value (contains text and numbers)

    yes please

  23. #23
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Formula like MAX to find the highest value (contains text and numbers)

    I think the easiest that to accomplish this would be to have a dedicated cell on each sheet where a formula can be entered to get the max value from each sheet.
    Let say cell C2 enter array formula
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    ***Array formula
    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER.
    You will know the array is active when you see curly braces { } appear around your formula.
    If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer.

    Then enter this regular formula in B2 on the first sheet
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by AlKey; 09-07-2016 at 10:40 AM.

  24. #24
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,984

    Re: Formula like MAX to find the highest value (contains text and numbers)

    If you have only a few sheets, this will work, without becoming too cumbersome:

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Last edited by Glenn Kennedy; 09-07-2016 at 11:56 AM.

  25. #25
    Registered User
    Join Date
    05-13-2013
    Location
    Southampton,England
    MS-Off Ver
    Excel 2007
    Posts
    35

    Re: Formula like MAX to find the highest value (contains text and numbers)

    Thank you guys!

    What I've did was:
    =MAX(IFERROR(--SUBSTITUTE(B3:B1000,LEFT(B3:B1000,4),""),0)) on the side of each work sheet which told me the max number without the puw-
    then where I need the data I just added a MAX formula that refered to the cell in each worksheet with the max value and displayed the highest number nice and easy

    Thank you!

+ 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. Replies: 2
    Last Post: 02-08-2016, 05:13 PM
  2. Replies: 3
    Last Post: 12-23-2012, 08:53 PM
  3. [SOLVED] Find average of highest 3 non zero numbers
    By Winship in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-25-2012, 01:33 PM
  4. Find top 2 lowest numbers and top 2 highest numbers
    By photographex in forum Excel General
    Replies: 7
    Last Post: 02-12-2011, 10:57 PM
  5. Replies: 6
    Last Post: 03-27-2009, 09:44 AM
  6. How to find the three highest numbers
    By disneymom in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-16-2008, 09:33 PM
  7. Replies: 1
    Last Post: 01-09-2006, 09:30 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