+ Reply to Thread
Results 1 to 10 of 10

Wrapping a 'MAX' Function around an IF Statement?

Hybrid View

  1. #1
    Registered User
    Join Date
    08-25-2010
    Location
    Birmingham
    MS-Off Ver
    Excel 2003
    Posts
    44

    Wrapping a 'MAX' Function around an IF Statement?

    Hi,

    I am trying to wrap a MAX function of some sort around some sort of IF statement. The same sort of thing as a SUMIF, but a MAXIF, if that makes sense?

    So i have for instance one sheet with many different registrations on some registrations appear more than once. Another colounm on that sheet has a max speed. What i want to do is, a formula to look for a certain registration (going off another sheet), and then get the MAX speed, from the set of MAX speeds for that registration.

    So if i had 5 lines for registration DV51 AZZ, it would have 5 max speeds. On the next sheet i want it to look up DV51 AZZ, and bring back the MAX number (speed) from the 5 max speeds.

    I hope this makes sense! And i hope its possible??

    Thanks for any help
    i love this forum.
    Jez
    Last edited by NBVC; 02-16-2012 at 08:53 AM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Wrapping a 'MAX' Function around an IF Statement?

    something like:

    =MAX(IF(A1:A10="x",B1:B10))

    confirmed with CTRL+SHIFT+ENTER not just ENTER

    where you are looking for "x" in A1:A10 and bringing max from all matches from B1:B10
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    08-16-2011
    Location
    Birmingham
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Wrapping a 'MAX' Function around an IF Statement?

    cant you just pivot it all and set ther field to max?

  4. #4
    Registered User
    Join Date
    08-25-2010
    Location
    Birmingham
    MS-Off Ver
    Excel 2003
    Posts
    44

    Re: Wrapping a 'MAX' Function around an IF Statement?

    Thanks guys, the forumula works great and you fortheloveofgod i think may well just made it much easier i didnt think of this. thanks very much

  5. #5
    Registered User
    Join Date
    08-25-2010
    Location
    Birmingham
    MS-Off Ver
    Excel 2003
    Posts
    44

    Re: Wrapping a 'MAX' Function around an IF Statement?

    Actually this isnt working. I know why i couldent do a pivot now, its because it needs to go into a pivot table eventually, but needs to go into a 'matrix' sheet which looks at many other different sheets before hand.So the pivot wont work unless i do a seperate table.

    The forumula isnt working either. Its just bringing back '0'
    Im going to attach my sheet to try and explain. Thanks

  6. #6
    Registered User
    Join Date
    08-25-2010
    Location
    Birmingham
    MS-Off Ver
    Excel 2003
    Posts
    44

    Re: Wrapping a 'MAX' Function around an IF Statement?

    Example MAX.xlsx

    I have uploaded my spreadsheet i have inserted a comment into it and what the outcome should be.
    Any help would be great.
    Cheers

  7. #7
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Wrapping a 'MAX' Function around an IF Statement?

    I got the same answer (76) with:

    =MAX(IF(Masternaught!$B$2:$B$7629=Matrix!A2,Masternaught!$J$2:$J$7629))

    confirmed with CTRL+SHIFT+ENTER not just ENTER

  8. #8
    Registered User
    Join Date
    08-25-2010
    Location
    Birmingham
    MS-Off Ver
    Excel 2003
    Posts
    44

    Re: Wrapping a 'MAX' Function around an IF Statement?

    Thanks NBVC, works great. Your a star. Can i ask, what is the difference with this CTRL+SHIFT ENTER, instead of just ENTER?

  9. #9
    Registered User
    Join Date
    08-16-2011
    Location
    Birmingham
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Wrapping a 'MAX' Function around an IF Statement?

    it makes it an array

  10. #10
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Wrapping a 'MAX' Function around an IF Statement?

    Here is more on Array Formulas

+ 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