简体   繁体   中英

How to find the maximum value based on another column?

I am trying to find the maximum value based on another column. This is what I have tried.

=MAX(IF(Sheet3!$B$2:$B$5491=Sheet4!A3,Sheet3!$E$2:$E$5491))

How I am reading this code is that if the criteria in sheet 3 in column B is equivalent to the cell in A3 in sheet 4, then return the maximum value that would be in column E from sheet 3. I found this code online and have tried variations but all it is doing is returning 0. Is there another way I could go about finding the max value?

Thanks,

GCC

It's an Array formula (aka CSE formula ). After entering or editing it, you should press

Ctrl Shift Enter

otherwise it won't work. Always remember this for array formulas.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM