Stuck on this...find MAX

theta

Well-known Member
Joined
Jun 9, 2009
Messages
960
Hi

I have data in 3 columns, but need to find the max of one based on certain criteria

COLUMN A contains numbers
COLUMN B contains type
COLUMN C contains location

So, for example, I need a formula in cell A20 that will be the MAX of column A above it, but only where

COLUMN B = "Contract"

AND

COLUMN C = "Amazingstoke"

Not sure on the best approach, using MAX or LARGE ? with either SUMPRODUCT or INDEX/MATCH....or maybe another method im not aware of?
 
I am using this one at present ;

It always finds the highest...how would I ammend it to find the lowest, replace the 2 with a 0?

=IFERROR(LOOKUP(2,1/(($A$10:$A15=$A16)/($D$10:$D15=$D16)/($G$10:$G15=$G16)),$B$10:$B15)+1,1)

Just learning
 
Upvote 0

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
Hmmm the zero doesnt work

How would I find the minimum value using the same approach (or alternative if the above is not possible)

?

Thanks
 
Upvote 0
Hmmm the zero doesnt work

How would I find the minimum value using the same approach (or alternative if the above is not possible)

?

Thanks

Why don't you just replace MAX with MIN in the formula already proposed or DMAX with DMIN?
 
Upvote 0
Hi Guys

This is all great, thanks

You mentioned using SQL...how would I use SQL within Excel?

Thanks
 
Upvote 0

Forum statistics

Threads
1,215,826
Messages
6,127,120
Members
449,359
Latest member
michael2

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top