using AND in a countif formula

C

creed

I am trying to make a formula that gives me a count of how many row
have the same date and time...i have tried everything i can think o
and can't seem to get it...any help is appreciated!

i.e.
saturday 14:00
saturday 11:00
saturday 14:00
saturday 14:00
saturday 14:00
monday 14:00
monday 14:00
tuesday 4:00
tuesday 14:00
tuesday 1:00

there will be 7 fields...one for each day and time...so in the abov
example they should display:(i left a lot of fields out below...onl
mentioned the ones that are used in the example)
saturday/14:00 - 4
saturday/11:00 - 1
monday/14:00 - 2
tuesday/4:00 - 1
tuesday/14:00 - 1
tuesday/1:00 -
 
C

creed

i used =SUMPRODUCT((A2:A50000="Saturday")*(E2:E50000="8:00"))

and it gave me a 0 instead of the 9 it should be
 
B

Bob Phillips

Try

=SUMPRODUCT((A2:A50000="Saturday")*(E2:E50000=--"08:00:00"))

--
HTH

Bob Phillips

(remove xxx from email address if mailing direct)
 
D

Don Guillett

try it this way
=SUMPRODUCT(($C$1:$C$5="Saturday")*(TEXT($D$1:$D$5,"hh:mm")="14:00"))
 
D

Don Guillett

or where g1 contains saturday & g2 contains 14:00
=SUMPRODUCT(($C$1:$C$5=g1)*($D$1:$D$5=G2))
 
C

creed

that gave me a 1

could it be messing up the numbers because i'm using a forula to get
those times?

the time field isn't directly input, i'm using a forumla to round the
actual time to the nearest hour
 
C

creed

oops...i lied...it didn't actually change it to a 1, it stayed 0...
forgot i switched sum to count to check i
 
C

creed

ok, i got it...the second thing you mentioned worked...i forgot to ad
sumproduct when i changed back from count...i just wrote sum..

thanks for the help
 

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