+ Reply to Thread
Results 1 to 8 of 8

How to use MAX function with multiple condition

Hybrid View

  1. #1
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,054

    Re: How to use MAX function with multiple condition

    This should do your quest:

    =MAX(IF($A$2:$A$42=A2,$C$2:$C$42-CODE(LEFT($B$2:$B$42,1))))=C2-CODE(LEFT($B2,1))

    comfirmed with ctrl+shift+enter

    Edit: note that criteria must be sorted alphabeticaly: CONP > DINP > INST > WARN
    Attached Files Attached Files
    Last edited by zbor; 08-05-2010 at 06:05 AM.
    Never use Merged Cells in Excel

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: How to use MAX function with multiple condition

    Using your original sample file wherein we assume sorting data is not permitted (else we would sort by date etc) then:

    D2:
    =REPT("P",(MAX(IF($A$2:$A$42=$A2,$C$2:$C$42))=$C2)*OR($B2="CONP",ISNA(MATCH($A2&"@CONP@"&$C2,$A$2:$A$42&"@"&$B$2:$B$42&"@"&$C$2:$C$42,0))))
    confirmed with CTRL + SHIFT + ENTER (enter alone will not suffice)
    copied down
    it's not clear what should happen in scenarios where multiple MAX dates are located for a given contact but none of those dates has COMP action - ie which is then to be selected ?

    the above is merely an alternative... a little long winded I grant you !
    Last edited by DonkeyOte; 08-05-2010 at 06:18 AM.

+ 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