+ Reply to Thread
Results 1 to 27 of 27

Finding the biggest value in a custom list

  1. #1
    Registered User
    Join Date
    04-26-2014
    Location
    Leuven, België
    MS-Off Ver
    Excel for Mac 2011
    Posts
    44

    Finding the biggest value in a custom list

    Does anyone know how to do this? I know how to make customs lists, but it's not getting me anywhere.

    Let's say I have a lot of data containing values as follows and in the following list I sorted them from small to large:

    5a
    5a+
    5b
    5b+
    5c
    5c+
    6a
    6a+
    6b
    6b+
    6c
    6c+
    7a
    7a+
    7b
    7b+
    7c
    7c+
    8a

    and so on... In the list, the date isn't sorted from small to large, many values (if not all) occur multiple times and on occasion some values are added to the column. With that last part I mean that you can see it as a batch of 500, and if so far the batch only contains 450 values there will be (for the time being until items get added) 50 empty cells in the column as well.

    You can't order numerically or alphabetically. I know I can make a custom list and then just sort according to that custom list so the biggest value would come out on top or bottom but that's not what I'm looking for either, as the data needs to be sort by another colomn (dates in chronological order).

    So I'm just looking for a formule saying "return the biggest value if the order of things is as I typed above'.

    Thanks for any help, I appreciate it!

    Denis
    Last edited by HosteDenis; 04-27-2014 at 12:21 PM.

  2. #2
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Finding the biggest value using the MAX function, but in a custom list

    With your sample data in A1:A19

    This regular formula returns the "largest" value from that list:
    Please Login or Register  to view this content.
    For the sample data, that formula returns: 8a
    Is that something you can work with?
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  3. #3
    Registered User
    Join Date
    04-26-2014
    Location
    Leuven, België
    MS-Off Ver
    Excel for Mac 2011
    Posts
    44

    Re: Finding the biggest value using the MAX function, but in a custom list

    Excel says my formula contains an error. It looks exactly like this now:

    Please Login or Register  to view this content.

  4. #4
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Finding the biggest value using the MAX function, but in a custom list

    In your scenario, the formula should be accepted...but, it will probably return an incorrect value. I'm guessing it's a "Mac Excel" issue.
    Try this regular formula:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Does that help?

  5. #5
    Registered User
    Join Date
    04-26-2014
    Location
    Leuven, België
    MS-Off Ver
    Excel for Mac 2011
    Posts
    44

    Re: Finding the biggest value using the MAX function, but in a custom list

    I'll check it later (on my phone now) but I thought excel said the error was in the first C117:C742, and that'll probably be the same with the new formula. Forgot to mention that in my previous post, sorry. Could the error be in the fact that some of the cells in that range are empty? Also, almost all values (inclusing the biggest) occur several times in the list.

    So far no cigar but still, thanks for the help!

  6. #6
    Registered User
    Join Date
    04-26-2014
    Location
    Leuven, België
    MS-Off Ver
    Excel for Mac 2011
    Posts
    44

    Re: Finding the biggest value using the MAX function, but in a custom list

    No, Excel is saying the same thing. The new formula contains an error and excel highlights the C742 part. But that cell is the last (empty) cell of a column that contains these values.

  7. #7
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Finding the biggest value using the MAX function, but in a custom list

    what is your regional list separator is it ; or ,
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  8. #8
    Registered User
    Join Date
    04-26-2014
    Location
    Leuven, België
    MS-Off Ver
    Excel for Mac 2011
    Posts
    44

    Re: Finding the biggest value using the MAX function, but in a custom list

    Not entirely sure what you mean by that, but if I type the number 4.67 in excel, I have to type it as 4,67 so excel considers it a number (and it moves to the right of the cell). If I use the . or ; character, excel considers it a string.

    So I'm guessing ; is my regional list separator?

  9. #9
    Forum Expert
    Join Date
    09-01-2012
    Location
    Norway
    MS-Off Ver
    Office 365
    Posts
    2,844

    Re: Finding the biggest value in a custom list

    I think what Martin is after is that maybe all the comma's in Ron's formula really should be ;. Could it be that simple?
    Hit Ctrl + h to use the Find and Replace feature.
    <----- If you were helped by my posts you can say "Thank you" by clicking the star symbol down to the left

    If the problem is solved, finish of the thread by clicking SOLVED under Thread Tools
    I don't wish to leave you with no answer, yet I sometimes miss posts. If you feel I forgot you, remind me with a PM or just bump the thread.

  10. #10
    Registered User
    Join Date
    04-26-2014
    Location
    Leuven, België
    MS-Off Ver
    Excel for Mac 2011
    Posts
    44

    Re: Finding the biggest value in a custom list

    It is now no longer giving me an error, but the cell does display '#NAME' now.

    Please Login or Register  to view this content.

  11. #11
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Finding the biggest value in a custom list

    what language is your excel in? that formula doesnt give me a #name error

  12. #12
    Registered User
    Join Date
    04-26-2014
    Location
    Leuven, België
    MS-Off Ver
    Excel for Mac 2011
    Posts
    44

    Re: Finding the biggest value in a custom list

    Language as in the language I run excel in, or as in the language excel uses to run?

    To answer the first, that would be Dutch. So technically it's giving me a '#NAAM' error instead of a '#NAME' error. To answer the second, I have no idea, I haven't installed any add-ons or messed with any code, I'm not that good at programming, but since's it's a Microsoft office program I guess it's written in C, C++, and C#?

  13. #13
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Finding the biggest value in a custom list

    so did you put the functions in Dutch?
    =INDEX(C117:C742;VERGELIJKEN(MAX(INDEX(AANTAL.ALS(C117:C742;"<"&C117:C742);0));INDEX(AANTAL.ALS(C117:C742;"<"&C117:C742);0);0))

  14. #14
    Registered User
    Join Date
    04-26-2014
    Location
    Leuven, België
    MS-Off Ver
    Excel for Mac 2011
    Posts
    44

    Re: Finding the biggest value in a custom list

    example file.xlsx

    here's what I have

  15. #15
    Registered User
    Join Date
    04-26-2014
    Location
    Leuven, België
    MS-Off Ver
    Excel for Mac 2011
    Posts
    44

    Re: Finding the biggest value in a custom list

    Quote Originally Posted by martindwilson View Post
    so did you put the functions in Dutch?
    =INDEX(C117:C742;VERGELIJKEN(MAX(INDEX(AANTAL.ALS(C117:C742;"<"&C117:C742);0));INDEX(AANTAL.ALS(C117:C742;"<"&C117:C742);0);0))
    Oh I see you just replied. I'll try that (could it really be that simple?) although I seem to remember I used to have worked with english functions in the past...

  16. #16
    Registered User
    Join Date
    04-26-2014
    Location
    Leuven, België
    MS-Off Ver
    Excel for Mac 2011
    Posts
    44

    Re: Finding the biggest value in a custom list

    Yes, it's giving me 7b now, which is the largest value!

    Thanks a lot for all the help guys, this is really good stuff. Quick replies and nice people, if I ever need help again with excel I'll come back!

  17. #17
    Registered User
    Join Date
    04-26-2014
    Location
    Leuven, België
    MS-Off Ver
    Excel for Mac 2011
    Posts
    44

    Re: Finding the biggest value in a custom list

    Just one more question, say if I wanted to return the biggest value, also taking in mind another value in another column (for example next to the three columns I gave in my example file, there'd be a fourth column saying small, medium, large for example) how would I have to alter the formula? How would it return the biggest value from all values that are medium, for example?
    Last edited by HosteDenis; 04-26-2014 at 06:06 PM.

  18. #18
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Finding the biggest value in a custom list

    in my excel it gives a value of 7b
    Attached Files Attached Files

  19. #19
    Registered User
    Join Date
    04-26-2014
    Location
    Leuven, België
    MS-Off Ver
    Excel for Mac 2011
    Posts
    44

    Re: Finding the biggest value in a custom list

    In my file, it does now too. I had to translate the functions like you did, but I had already replied before I saw your post. Thanks a lot for the help. Just one more question, say if I wanted to return the biggest value, also taking in mind another value in another column (for example next to the three columns I gave in my example file, there'd be a fourth column saying small, medium, large for example) how would I have to alter the formula? How would it return the biggest value from all values that are medium, for example?
    Last edited by HosteDenis; 04-26-2014 at 06:06 PM.

  20. #20
    Registered User
    Join Date
    04-26-2014
    Location
    Leuven, België
    MS-Off Ver
    Excel for Mac 2011
    Posts
    44

    Re: Finding the biggest value in a custom list

    Can't seem to find what to alter in the original formula. But so far your help's been great!

  21. #21
    Registered User
    Join Date
    04-26-2014
    Location
    Leuven, België
    MS-Off Ver
    Excel for Mac 2011
    Posts
    44

    Re: Finding the biggest value in a custom list

    Can anyone help?

  22. #22
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Finding the biggest value in a custom list

    With
    C117:C742 containing your list to rank
    and
    D117:D742 containing a category in: Large, Medium, Small
    and
    B1: a value to match in Col_D....Medium

    I don't know the Dutch translations...but this ARRAY FORMULA, completed by holding down CTRL and SHIFT when you press ENTER (instead of just pressing ENTER)
    returns the largest Col_C value where the Col_D value matches B1 (works in the English version):
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Slightly longer regular (non-array) formula:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Is that something you can work with?

  23. #23
    Registered User
    Join Date
    04-26-2014
    Location
    Leuven, België
    MS-Off Ver
    Excel for Mac 2011
    Posts
    44

    Re: Finding the biggest value in a custom list

    I used the following formula (based on your second formula):

    Please Login or Register  to view this content.
    Take in mind that 'countif' is 'aantal.als' in dutch and 'if' is 'als' and 'match' is 'vergelijken' and also that my list separator is ; and not a comma. The value I want in B1 is 'trad', but there might be more info in the cell other than 'trad' so I should look for '*trad*', right?

    Well, the formula doesn't give me an error, but it's not returning the correct value either... I'll give an example file.
    Last edited by HosteDenis; 04-27-2014 at 11:36 AM.

  24. #24
    Registered User
    Join Date
    04-26-2014
    Location
    Leuven, België
    MS-Off Ver
    Excel for Mac 2011
    Posts
    44

    Re: Finding the biggest value in a custom list

    Here is my example file:

    example file I need help with.xlsx

    So the formula i used is your second one, not the array one. I have worked and am working with array formula's right now, so I know what they do and how they work, but I haven't used the IFERROR function before so I preferred your second option.
    Last edited by HosteDenis; 04-27-2014 at 11:36 AM.

  25. #25
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Finding the biggest value in a custom list

    handy translator here
    http://en.excel-translator.de/

  26. #26
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Finding the biggest value in a custom list

    Only certain functions recognize wildcards.

    Try this regular formula in your workbook...(changing commas to semicolons and replacing english functions with dutch):
    Please Login or Register  to view this content.
    Is that better?

  27. #27
    Registered User
    Join Date
    04-26-2014
    Location
    Leuven, België
    MS-Off Ver
    Excel for Mac 2011
    Posts
    44

    Re: Finding the biggest value in a custom list

    That does seem to work in my example file, I'll try it in the real file with the different column- and row-numbers now but it should work! Thanks a lot!

    Really great help here on this forum. If it works I'll change to title to SOLVED!

    For those interested:

    Please Login or Register  to view this content.
    EDIT: it works guys, thanks a lot! Changed title to Solved
    Last edited by HosteDenis; 04-27-2014 at 12:22 PM.

+ 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] Formula to give me the 10 biggest values in a list (including duplicates)
    By ExcelFailure in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 11-05-2013, 10:55 AM
  2. Finding and filling custom cells with custom values.
    By Durarara in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-08-2012, 03:15 PM
  3. Biggest in list and matching
    By medman in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-18-2011, 12:18 AM
  4. Finding Label/Symbol of Biggest Value in an Array
    By uberathlete in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-12-2007, 05:51 PM
  5. Finding a name with biggest number
    By Handyy in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 02-06-2006, 08:15 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