COUNTIFS for 2003

T

Tromba

My daughter is trying to count dates within a certain range, and I figured it
out quickly with COUNTIFS:

=COUNTIFS(Log!H:H,">2/8/08",Log!H:H,"<2/16/08")
result was 34

Then I found out she only has Office 2003 at her office. I've tried all
kinds of solutions and suggestions but haven't had success. I think it might
be because I'm using dates and most examples I've seen are using strings or
numbers.

I know SUMPRODUCT can't use whole rows, and tried this

=SUMPRODUCT(--(Log!H1:H4874>"2/8/2008"),--(Log!H1:H4874<"2/16/2008")
result was 0 so it didn't work

Any suggestions?
 
T

Tromba

Ragdyer said:
One way:

=COUNTIF(Log!H:H,">2/8/08")-COUNTIF(Log!H:H,">=2/16/08")

THANK YOU.... that did it. I know I tried two COUNTIFs before, but I must
have misplaced the quotes
 
T

T. Valko

Try one of these:

=COUNTIF(Log!H:H,">2008/2/8")-COUNTIF(Log!H:H,">=2008/2/16")

=SUMPRODUCT(--(Log!H1:H4874>--"2008/2/8"),--(Log!H1:H4874<--"2008/2/16"))

Personally, I don't like to reference dates like that. I would use either
the DATE function or I'd use cells to hold the dates and then refer to those
cells:

=COUNTIF(Log!H:H,">"&DATE(2008,2,8))-COUNTIF(Log!H:H,">="DATE(2008,2,16))

=SUMPRODUCT(--(Log!H1:H4874>DATE(2008,2,8)),--(Log!H1:H4874<DATE(2008,2,16)))

A1 = 2/8/2008
B1 = 2/16/2008

=COUNTIF(Log!H:H,">"&A1)-COUNTIF(Log!H:H,">="&B1)

=SUMPRODUCT(--(Log!H1:H4874>A1),--(Log!H1:H4874<B1))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top