We help IT Professionals succeed at work.

# Excel Formula

cansevin asked
on
I am trying to count how many dates appeared for each week of the year. I need a countif formula for it.

I have column A with 150 dates in it that need to be counted. I then have column C with Sunday dates and Column D with Saturday dates. I need a formula in column E that will count all the column A dates that are in between column C and D (but including the endpoints). Any ideas? Thanks!
Comment
Watch Question

## View Solution Only

CERTIFIED EXPERT
Most Valuable Expert 2013

Commented:
Try using this formula in E2 copied down

=COUNTIFS(A:A,">="&C2,A:A,"<="&D2)

regards, barry
CERTIFIED EXPERT
Most Valuable Expert 2013
Commented:
Here's an example with random 2011 dates. Press F9 to re-generate random dates

regards, barry
27428758.xlsx

Commented:
Thanks! It isn't calculating it accuratly, any idea why?

Chris
Data-on-Innoport-from-Year-10-to.xls

Commented:
It is like it is exactly one week off for some reason...
CERTIFIED EXPERT
Most Valuable Expert 2013

Commented:
Hello Chris,

You are starting on row 4 so you need to change the formula in that row to reference C4 and D4 (not C2 and D2), i.e. in E4

=COUNTIFS(A:A,">="&C4,A:A,"<="&D4)

then copy down

see attached
barry-dates.xlsx

Commented:
Thanks!