MAX with multiple conditions

jakemelon

Board Regular
Joined
Mar 14, 2003
Messages
76
Hi!

I need below conditions met and then need the MAX value from the qry_live_pipe_Crosstab'!$C$2:$C$999 range. For some reason this is not working help!


{=MAX(IF((Headcount!$A$2:$A$999=E2)*(Headcount!$D$2:$D$999="Yes")*('C:\[livepipe.xls]qry_live_pipe_Crosstab'!A2:A999=E2),'C:\[livepipe.xls]qry_live_pipe_Crosstab'!$C$2:$C$999))}

thanks
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.

Aladin Akyurek

MrExcel MVP
Joined
Feb 14, 2002
Messages
85,209
jakemelon said:
The max value it pulls is always wrong.

Not sure this bit of info is better than just "not working"...

Perhaps:

{=MAX(IF((Headcount!$A$2:$A$999=E2)*(Headcount!$D$2:$D$999="Yes")*('C:\[livepipe.xls]qry_live_pipe_Crosstab'!A2:A999=E2)*('C:\[livepipe.xls]qry_live_pipe_Crosstab'!$C$2:$C$999),'C:\[livepipe.xls]qry_live_pipe_Crosstab'!$C$2:$C$999))}
 

jakemelon

Board Regular
Joined
Mar 14, 2003
Messages
76
I think the issue may be that one of ranges is on a seperate workbook. The moment I move the data to the same workbook it starts working. Why would that be an issue?

thanks
 

Aladin Akyurek

MrExcel MVP
Joined
Feb 14, 2002
Messages
85,209
jakemelon said:
I think the issue may be that one of ranges is on a seperate workbook. The moment I move the data to the same workbook it starts working. Why would that be an issue?

thanks

Jake,

Just checked your hunch. It simply does not hold. The following formula, similar to yours, works as intended:

=MAX(IF(($D$2:$D$6="a")*($E$2:$E$6="w")*([livepipe.xls]qry_live_pipe_Crosstab!$F$2:$F$6=40),[livepipe.xls]qry_live_pipe_Crosstab!$G$2:$G$6))

This also works when livepipe.xls is closed.
 

Forum statistics

Threads
1,148,528
Messages
5,747,221
Members
424,069
Latest member
kamkwok1hh

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