Count If with AND and Multiple OR conditions

AW2020

New Member
Joined
Oct 20, 2020
Messages
1
Office Version
  1. 365
Platform
  1. Windows
Hi all,

Need some assistance with a formula.

Data (Tab 1)

AB
1Date (DD/MM/YY)Status
211/09/20Received
301/10/20Reviewed
415/10/20In Progress
516/10/20Requested
610/10/20Received

Report (Tab 2)
AB
1MonthNumber Active
2Oct-20



I need a formula that counts the number of cells and puts it in Tab 2 'B2' that match the following:

1. Date (A2-A6) is within October 2020 (ie Oct-20), AND
2. Status is either Received or "In Progress" or "Requested"

So in this case the answer should be 3.

Any assistance would be greatly appreciated.

I am using O365.

Rgds,
AW 2020
 

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.
I'm sure there are much better ways to do this but I've been playing about with FILTER with multiple criteria in Excel 365 and came up with this.
Excel Formula:
=COUNT(FILTER(Sheet1!A1:A6,((Sheet1!B1:B6>=DATE(YEAR(B2),MONTH(B2),1))*(Sheet1!B1:B6<DATE(YEAR(B2),MONTH(B2)+1,1)))*(Sheet1!C1:C6="Received")+(Sheet1!C1:C6="In Progress")+(Sheet1!C1:C6="Requested")))
 
Upvote 0
Actually came up with something a bit more compact.
Excel Formula:
=COUNT(FILTER(Sheet1!A1:A6,((Sheet1!B1:B6>=DATE(YEAR(B2),MONTH(B2),1))*(Sheet1!B1:B6<DATE(YEAR(B2),MONTH(B2)+1,1)))*(NOT(ISERROR(MATCH(Sheet1!C1:C6,{"Received","In Progress","Requested"},0))))))
 
Upvote 0
try this

Book1
ABC
11Date (DD/MM/YY)Status
2211/09/2020Received
3301/10/2020Reviewed
4415/10/2020In Progress
5516/10/2020Requested
6610/10/2020Received
7
8
9
101MonthNumber Active
112Oct-203
Sheet1
Cell Formulas
RangeFormula
C11C11=SUMPRODUCT(--(MONTH(B11)=MONTH(B2:B6))*(C2:C6={"Received","In Progress","Requested"}))
 
Upvote 0
Another option
Help.xlsx
AB
1Data (DD/MM/YY)Status
211/09/2020Received
301/10/2020Reviewed
415/10/2020In Progress
516/10/2019Requested
610/10/2020Received
7
Sheet1


Help.xlsx
AB
1MonthNumber Active
2Oct-202
3
Sheet2
Cell Formulas
RangeFormula
B2B2=SUM(COUNTIFS(Sheet1!A:A,">="&A2,Sheet1!A:A,"<="&EOMONTH(A2,0),Sheet1!B:B,{"Received","In progress","Requested"}))
 
Upvote 0

Forum statistics

Threads
1,214,629
Messages
6,120,630
Members
448,973
Latest member
ChristineC

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