Multiple COUNTIFS dependent on Cell COntents

surkdidat

Well-known Member
Joined
Oct 1, 2011
Messages
594
Office Version
  1. 365
I have the following code
Code:
=IF(Master!M:M="",COUNTIFS(Master!L:L,">"&(TODAY()+30),Master!L:L,"<>2958465",Master!O:O,"<>*Rejected*",Master!O:O,"<>*Completed*",
Master!C:C,"<>",Master!F:F,"<>BI"),"")

What I need to do is have the above code, what I now need it to do is if there is a value in Column M in the Master sheet, is to repeat the same code and add the two formulae answers up. However, I only want it once per row.

So, if M2 had no value, it would perform the formula in L2, and if it is correct, then it would add one.
If there was a value in M2 and L2, I only want it to perform the formula in M2 (ignore L2's value completely.)

Hope that makes sense!

--|--COLUMN L--|--COLUMN M--|
-1-|-30/12/2018--|---[blank]----| (Counts only L)
-2|-30/12/2018--|-20/11/2018--| (Counts nothing as M is within 30 days, and M overrules column L)
-3|-30/12/2018--|---[blank]----| (Counts only L)
-4|-30/12/2018--|-30/12/2018--| (Counts Only M as M overrules L and over 30 days)
-5|
---[blank]----
|---[blank]----| (No count)

So would return a value of 3 (rows 1,3, and 4)
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December

Forum statistics

Threads
1,223,952
Messages
6,175,595
Members
452,656
Latest member
earth

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