Countif function criteria

mrsushi

Board Regular
Joined
Nov 18, 2006
Messages
180
Office Version
  1. 2010
Hi,

I have the sheet "daily Stats" which has dates in cell E1. E2, E3....etc. Each column has data of delivery times.

On another sheet called "monthly averages", i have a table with months in column A3:A13. B1 and B2 has a time range ie 00:00 and 00:59.

My current formula is in cell B3
Excel Formula:
COUNTIFS('Daily Stats'!$D:$XFD, ">="&B1, 'Daily Stats'!$D:$XFD, "<="&B2)

The formula is looking at ALL column data. However, I only want to count those within January, February etc?

Any ideas how to amend this formula please?

1710342186975.png


1710342219937.png
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
Why does it say "File not found" in your first screenshot?
Will you be fixing this or leaving the DIV/0 error as it is?
 
Upvote 0
This is about as far as I can get

Can you base something on this test?
=SUMPRODUCT((E$2:G$4)*(A2=E$1:G$1))

I started of with A2=TEXT(MONTH(E1:G1),"mmmm") to match months but this didn't work.
A2:A4 reads January February March
E1:G1 reads January February March
with values in E2:G4

This will give you a total, you'll need to divide by number of entries in your column to get an average.
 
Upvote 0
This is about as far as I can get

Can you base something on this test?
=SUMPRODUCT((E$2:G$4)*(A2=E$1:G$1))

I started of with A2=TEXT(MONTH(E1:G1),"mmmm") to match months but this didn't work.
A2:A4 reads January February March
E1:G1 reads January February March
with values in E2:G4

This will give you a total, you'll need to divide by number of entries in your column to get an average.

how can the current formula incorporate this? Apologies Im not sure how to tweak this
 
Upvote 0

Forum statistics

Threads
1,224,814
Messages
6,181,126
Members
453,021
Latest member
Justyna P

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