CountIF from 2 rows...

Newbie1974

New Member
Joined
Dec 13, 2020
Messages
2
Office Version
  1. 365
Platform
  1. Windows
I have an excel spreadsheet that i need to count outputs.

It contains every case an individual has looked at and the date they looked at it...

I need to calculate the total one individual looked at in a date range.

What formula can i use to calculate this automatically.
I know how to calculate date range and name individually, but unsure how to put this altogether in one formula
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
COUNTIFS is the solution.

You should have now =COUNTIF(range1,criteria1)

Just extend that with both like this:

=COUNTIFS(range1,criteria1,range2,criteria2)
 
Upvote 0
Newbie1974.xlsx
ABCDEF
1IndividualCaseDateFrom10-Sep-20
2FredX5409-Sep-20To21-Sep-20
3BertX8113-Sep-20NameFred
4SusanX10813-Sep-20Count2
5FredX13515-Sep-20
6BertX16217-Sep-20
7SusanX18919-Sep-20
8FredX21621-Sep-20
9BertX24323-Sep-20
10SusanX27025-Sep-20
Sheet1
Cell Formulas
RangeFormula
F4F4=COUNTIFS($A$2:$A$9999,$F$3,$C$2:$C$9999,">="&$F$1,$C$2:$C$9999,"<="&$F$2)
 
Upvote 0
Another way ..

20 12 14.xlsm
ABCDEF
1IndividualCaseDateFrom10-Sep-20
2FredX5409-Sep-20To21-Sep-20
3BertX8113-Sep-20NameFred
4SusanX10813-Sep-20Count2
5FredX13515-Sep-20
6BertX16217-Sep-20
7SusanX18919-Sep-20
8FredX21621-Sep-20
9BertX24323-Sep-20
10SusanX27025-Sep-20
Count
Cell Formulas
RangeFormula
F4F4=COUNT(FILTER(C2:C10,(C2:C10>=F1)*(C2:C10<=F2)*(A2:A10=F3)))
 
Upvote 0
Another way ..

20 12 14.xlsm
ABCDEF
1IndividualCaseDateFrom10-Sep-20
2FredX5409-Sep-20To21-Sep-20
3BertX8113-Sep-20NameFred
4SusanX10813-Sep-20Count2
5FredX13515-Sep-20
6BertX16217-Sep-20
7SusanX18919-Sep-20
8FredX21621-Sep-20
9BertX24323-Sep-20
10SusanX27025-Sep-20
Count
Cell Formulas
RangeFormula
F4F4=COUNT(FILTER(C2:C10,(C2:C10>=F1)*(C2:C10<=F2)*(A2:A10=F3)))

What is the(FILTER) for?
 
Upvote 0
What is the(FILTER) for?
FILTER is one of the new dynamic array functions that is available in Excel 365. I have used it to extract the rows that meet your criteria so that those rows can be counted to get your required result.
 
Upvote 0

Forum statistics

Threads
1,215,584
Messages
6,125,670
Members
449,248
Latest member
wayneho98

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