MAX IF array with multiple conditions

leonp

New Member
Joined
Sep 9, 2016
Messages
19
Hello,

Can someone help me understand why my formula isn’tworking? I found online how to returnthe maximum value if two criteria are met yet I can’t figure out why it isn’tworking.

The formula is as follows…..

MAX(IF('Data'!$A:$A='Result'!B2,IF('Data'!$B:$B='Result'!B3,'Data'!$C:$C)))

There’s a lot of data so I can’t really attach the file butto summarise:

Data column A is a machine number (e.g. machine 1, machine2, machine 3), Result B2 is a specific machine (e.g. machine 2)
Data column B is a product (e.g. product 1, product 2,product 3), Result B3 is a specific product (e.g. product 3)
Data column C is a time of production (e.g. 07:00, 08:15,10:08)

What I want the formula to return is the latest time a productwas completed on a given machine.

Hope that makes sense.

Thanks!

 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
Re: MAX IF array with multiple conditions help!

Did you enter it CTRL-SHIFT-ENTER? Other things to note are you will have a very slow formula if you use full column references for these array formulas and there is a big difference between machine2 and machine 2 with a space so make sure you are correct with your naming.
 
Upvote 0
Re: MAX IF array with multiple conditions help!

the formula you have is an array and would need to entered with control shift enter

you could try something like....

=AGGREGATE(14,6,Result!C:C/((Result!A:A=B3)*(Result!B:B=B2)),1)

which is just committed with enter
 
Upvote 0
Re: MAX IF array with multiple conditions help!

I'm a little suspicious of the relative addressing.
It appears that Result page is arranged transposed from the Data page, in that you are testing Data!A:A against Result!B2 and Data!B:B against Result!B3

And if you drag the formula down one cell, the formula will adjust to compare B3 against Data!A:A
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,182
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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