Countifs formula

Mattlake

Board Regular
Joined
Apr 9, 2020
Messages
87
Office Version
  1. 2021
Platform
  1. Windows
Hi

After two days and no hair left (I didn't want to jump straight to the forum) I am in need of your help once more.

I have a spreadsheet that is totalling up fields from another tab.

What I am looking to do is to count up column if it has certain text in and with in a date range.

the formula I have got to is =COUNTIFS('2022'!E:E,A3,'2022'!F:F,D24:E24) but this is showing 0

any help would be so appreciated

Regards
Matthew
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
Breaking down your formula gives me

Excel Formula:
=COUNTIFS(
criteria_range1 = '2022'!E:E
criteria1 = A3
criteria_range2 = '2022'!F:F
criteria2 = D24:E24
)

Why is your second criteria a range of multiple cells? I don't think the COUNTIFS function can handle multiple cells as a criteria.
 
Upvote 0
How about
Excel Formula:
=sumproduct(COUNTIFS('2022'!E:E,A3,'2022'!F:F,D24:E24))
 
Upvote 0
Upvote 0
try this
Excel Formula:
=SUMPRODUCT(--('2022'!F:F>=D24), --('2022'!F:F<=E24), --('2022'!E:E=A3))
 
Upvote 0
Solution
how do you you keep this all in your heads!!!!

Thank you that worked.

The D24 - E24 were the date range

Regards

Matthew
 
Upvote 0
If D24 & E24 are the dates, I would suggest
Excel Formula:
=COUNTIFS('2022'!E:E,A3,'2022'!F:F,">="&D24,'2022'!F:F,"<="&E24)
it will be more efficient than sumproduct, especially when you whole column references.
 
Upvote 0

Forum statistics

Threads
1,214,518
Messages
6,119,985
Members
448,935
Latest member
ijat

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