Add extra criteria into IF/MAXIF

surkdidat

Well-known Member
Joined
Oct 1, 2011
Messages
582
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

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 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,216,099
Messages
6,128,823
Members
449,470
Latest member
Subhash Chand

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