MAX Value with Multiple Criteria

robocop1906

Board Regular
Joined
Jan 15, 2003
Messages
143
Trying to get the formula below to work.
It works with out the ('Data Sheet'!Y$4:Y$1000="Complete") when I try to add a second criteria.

Tyring to retrurn the greatest value based on multiple criteria

=MAX(('Data Sheet'!D$4:D$1000=A46),('Data Sheet'!Y$4:Y$1000="Complete"))*'Data Sheet'!U$4:U$1000
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.

Domenic

MrExcel MVP
Joined
Mar 10, 2004
Messages
19,647
Try...

=MAX(IF('Data Sheet'!D$4:D$1000=A46,IF('Data Sheet'!Y$4:Y$1000="Complete",'Data Sheet'!U$4:U$1000)))

...confirmed with CONTROL+SHIFT+ENTER, not just ENTER.
 

robocop1906

Board Regular
Joined
Jan 15, 2003
Messages
143
That worked, is there a way to index the Max value and return what's in column A? So same logic, I just want to return what's in column A:A vs the actual value in U:U
 

Domenic

MrExcel MVP
Joined
Mar 10, 2004
Messages
19,647
Try the following formula, which needs to be confirmed with CONTROL+SHIFT+ENTER...

=INDEX('Data Sheet'!A$4:A$1000,MATCH(A2,IF('Data Sheet'!D$4:D$1000=A46,IF('Data Sheet'!Y$4:Y$1000="Complete",'Data Sheet'!U$4:U$1000)),0))

...where A2 contains the result of the first formula.
 

gecs

Active Member
Joined
Jan 26, 2009
Messages
320
For the max value you may also try:

=LOOKUP(2,1/(('Data Sheet'!D$4:D$1000=A46)*('Data Sheet'!Y$4:Y$1000="Complete")*('Data Sheet'!U$4:U$1000=MAX(('Data Sheet'!D$4:D$1000=A46)*('Data Sheet'!Y$4:Y$1000="Complete")*('Data Sheet'!U$4:U$1000)))),'Data Sheet'!U$4:U$1000)

confirmed only with Enter (NOT AN ARRAY FORMULA!)

Aladin's magic LOOKUP(2,1/...) formula is so versatile, I can't stop trying to use it instead of an array formula :biggrin:
 

Aladin Akyurek

MrExcel MVP
Joined
Feb 14, 2002
Messages
85,209
For the max value you may also try:

=LOOKUP(2,1/(('Data Sheet'!D$4:D$1000=A46)*('Data Sheet'!Y$4:Y$1000="Complete")*('Data Sheet'!U$4:U$1000=MAX(('Data Sheet'!D$4:D$1000=A46)*('Data Sheet'!Y$4:Y$1000="Complete")*('Data Sheet'!U$4:U$1000)))),'Data Sheet'!U$4:U$1000)

confirmed only with Enter (NOT AN ARRAY FORMULA!)

Aladin's magic LOOKUP(2,1/...) formula is so versatile, I can't stop trying to use it instead of an array formula :biggrin:

It's also an array-grinding formula, although control+shift+enter signalling is not required... And, it's here probably not efficient either.
 

Watch MrExcel Video

Forum statistics

Threads
1,133,636
Messages
5,660,004
Members
418,542
Latest member
Sandy3503

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
Top