Forum Discussion

hazwoper1's avatar
hazwoper1
Copper Contributor
Dec 20, 2022
Solved

Index Match with DMax?

How do I use a formula to populate column C with the most recent date based on the location? 

 

Have the data on the left, need results on the right. Thank you!

 

Have thisNeed this

  • hazwoper1 

    =LARGE(IF($B$2:$B$12=B2,$A$2:$A$12),1)

    You can try this formula. Enter the formula with ctrl+shift+enter if you don't work with Office365 or Excel 2021.

     

  • hazwoper1 

    =LARGE(IF($B$2:$B$12=B2,$A$2:$A$12),1)

    You can try this formula. Enter the formula with ctrl+shift+enter if you don't work with Office365 or Excel 2021.

     

    • hazwoper1's avatar
      hazwoper1
      Copper Contributor

      OliverScheurich Thank you! This works.

       

      I have another layer to this problem. What if I need to group the most recent date by username also? 

       

      Will the IF function take multiple arguments? Something like:

       

      =LARGE(IF($B$2:$B$12 =B2 AND $C$2:$C$12 = C2, $A$2:$A$12),1)  

       

      Group by location and username

      • OliverScheurich's avatar
        OliverScheurich
        Gold Contributor

        hazwoper1 

        =LARGE(IF(($B$2:$B$12=B2)*($C$2:$C$12=C2),$A$2:$A$12),1)

        You are welcome. You can try this formula. It's actually the formula you suggested. Enter the formula with ctrl+shift+enter if you don't work with Office365 or Excel 2021.

Resources