Add extra criteria into IF/MAXIF

surkdidat

Well-known Member
Joined
Oct 1, 2011
Messages
594
Office Version
  1. 365
Hopefully this is an easy one, but my brain is now so fizzled I cannot work out where in the formula I need to add what I need!

My current formula is

Code:
=IF(OR('DEV WIP'!C3="",SUM('DEV WIP'!$M3:$AB3)=0),"",
IFS(
MAXIFS('DEV WIP'!$N3:$AB3,'DEV WIP'!$N3:$AB3,"<"&AH$2+7,'DEV WIP'!$N3:$AB3,">0")='DEV WIP'!$AB3,'DEV WIP'!$AB$1,
MAXIFS('DEV WIP'!$N3:$AB3,'DEV WIP'!$N3:$AB3,"<"&AH$2+7,'DEV WIP'!$N3:$AB3,">0")='DEV WIP'!$AA3,'DEV WIP'!$AA$1,
MAXIFS('DEV WIP'!$N3:$AB3,'DEV WIP'!$N3:$AB3,"<"&AH$2+7,'DEV WIP'!$N3:$AB3,">0")='DEV WIP'!$Z3,'DEV WIP'!$Z$1,
MAXIFS('DEV WIP'!$N3:$AB3,'DEV WIP'!$N3:$AB3,"<"&AH$2+7,'DEV WIP'!$N3:$AB3,">0")='DEV WIP'!$Y3,'DEV WIP'!$Y$1,
MAXIFS('DEV WIP'!$N3:$AB3,'DEV WIP'!$N3:$AB3,"<"&AH$2+7,'DEV WIP'!$N3:$AB3,">0")='DEV WIP'!$R3,'DEV WIP'!$R$1,
MAXIFS('DEV WIP'!$N3:$AB3,'DEV WIP'!$N3:$AB3,"<"&AH$2+7,'DEV WIP'!$N3:$AB3,">0")='DEV WIP'!$P3,'DEV WIP'!$P$1,
MAXIFS('DEV WIP'!$N3:$AB3,'DEV WIP'!$N3:$AB3,"<"&AH$2+7,'DEV WIP'!$N3:$AB3,">0")='DEV WIP'!$O3,'DEV WIP'!$O$1,
MAXIFS('DEV WIP'!$N3:$AB3,'DEV WIP'!$N3:$AB3,"<"&AH$2+7,'DEV WIP'!$N3:$AB3,">0")='DEV WIP'!$N3,'DEV WIP'!$N$1))

What I need to add is for the formula to only do return a result if, in column E the cell equals "YES"
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
try
Code:
=IF(E1="YES",IF(OR('DEV WIP'!C3="",SUM('DEV WIP'!$M3:$AB3)=0),"",
IFS(
MAXIFS('DEV WIP'!$N3:$AB3,'DEV WIP'!$N3:$AB3,"<"&AH$2+7,'DEV WIP'!$N3:$AB3,">0")='DEV WIP'!$AB3,'DEV WIP'!$AB$1,
MAXIFS('DEV WIP'!$N3:$AB3,'DEV WIP'!$N3:$AB3,"<"&AH$2+7,'DEV WIP'!$N3:$AB3,">0")='DEV WIP'!$AA3,'DEV WIP'!$AA$1,
MAXIFS('DEV WIP'!$N3:$AB3,'DEV WIP'!$N3:$AB3,"<"&AH$2+7,'DEV WIP'!$N3:$AB3,">0")='DEV WIP'!$Z3,'DEV WIP'!$Z$1,
MAXIFS('DEV WIP'!$N3:$AB3,'DEV WIP'!$N3:$AB3,"<"&AH$2+7,'DEV WIP'!$N3:$AB3,">0")='DEV WIP'!$Y3,'DEV WIP'!$Y$1,
MAXIFS('DEV WIP'!$N3:$AB3,'DEV WIP'!$N3:$AB3,"<"&AH$2+7,'DEV WIP'!$N3:$AB3,">0")='DEV WIP'!$R3,'DEV WIP'!$R$1,
MAXIFS('DEV WIP'!$N3:$AB3,'DEV WIP'!$N3:$AB3,"<"&AH$2+7,'DEV WIP'!$N3:$AB3,">0")='DEV WIP'!$P3,'DEV WIP'!$P$1,
MAXIFS('DEV WIP'!$N3:$AB3,'DEV WIP'!$N3:$AB3,"<"&AH$2+7,'DEV WIP'!$N3:$AB3,">0")='DEV WIP'!$O3,'DEV WIP'!$O$1,
MAXIFS('DEV WIP'!$N3:$AB3,'DEV WIP'!$N3:$AB3,"<"&AH$2+7,'DEV WIP'!$N3:$AB3,">0")='DEV WIP'!$N3,'DEV WIP'!$N$1)),"")
 
Upvote 0
Thank you - I was trying to imbed it into the code already written and not a separate statement. Easy from a fresh pair of eyes!
try
Code:
=IF(E1="YES",IF(OR('DEV WIP'!C3="",SUM('DEV WIP'!$M3:$AB3)=0),"",
IFS(
MAXIFS('DEV WIP'!$N3:$AB3,'DEV WIP'!$N3:$AB3,"<"&AH$2+7,'DEV WIP'!$N3:$AB3,">0")='DEV WIP'!$AB3,'DEV WIP'!$AB$1,
MAXIFS('DEV WIP'!$N3:$AB3,'DEV WIP'!$N3:$AB3,"<"&AH$2+7,'DEV WIP'!$N3:$AB3,">0")='DEV WIP'!$AA3,'DEV WIP'!$AA$1,
MAXIFS('DEV WIP'!$N3:$AB3,'DEV WIP'!$N3:$AB3,"<"&AH$2+7,'DEV WIP'!$N3:$AB3,">0")='DEV WIP'!$Z3,'DEV WIP'!$Z$1,
MAXIFS('DEV WIP'!$N3:$AB3,'DEV WIP'!$N3:$AB3,"<"&AH$2+7,'DEV WIP'!$N3:$AB3,">0")='DEV WIP'!$Y3,'DEV WIP'!$Y$1,
MAXIFS('DEV WIP'!$N3:$AB3,'DEV WIP'!$N3:$AB3,"<"&AH$2+7,'DEV WIP'!$N3:$AB3,">0")='DEV WIP'!$R3,'DEV WIP'!$R$1,
MAXIFS('DEV WIP'!$N3:$AB3,'DEV WIP'!$N3:$AB3,"<"&AH$2+7,'DEV WIP'!$N3:$AB3,">0")='DEV WIP'!$P3,'DEV WIP'!$P$1,
MAXIFS('DEV WIP'!$N3:$AB3,'DEV WIP'!$N3:$AB3,"<"&AH$2+7,'DEV WIP'!$N3:$AB3,">0")='DEV WIP'!$O3,'DEV WIP'!$O$1,
MAXIFS('DEV WIP'!$N3:$AB3,'DEV WIP'!$N3:$AB3,"<"&AH$2+7,'DEV WIP'!$N3:$AB3,">0")='DEV WIP'!$N3,'DEV WIP'!$N$1)),"")
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,324
Members
452,635
Latest member
laura12345

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