Multiple COUNTIFS dependent on Cell COntents

surkdidat

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

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)

Forum statistics

Threads
1,224,946
Messages
6,181,951
Members
453,075
Latest member
anandn93

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