Counting values based on multiple conditions

  • Thread starter Thread starter Paul
  • Start date Start date
P

Paul

Hello,

I am trying to count the number of times the word "homicide" occurs in cells
J2:J1500 between the dates of 10-1-2008 and 10-31-2008...the dates are listed
in cells A2:A1500...I am fairly fluent in excel and I tried this
formula...=SUM(IF((J2:J1500="Homicide",IF(A2:A1500>=DATEVALUE("10/1/2008"))*(A2:A1500<=DATEVALUE("10/31/2008)),1,0))
.....I've also tried a couple other ways to formulate it but i keep getting
an error..any help would be appreciated..also worth noting is this is for my
security department..i can see how some might think searching for the word
homicide would be odd..haha
 
Hi,

Try this

=SUMPRODUCT((J2:J25="Homicide")*(A2:A25>=DATE(2008,10,1))*(A2:A25<=DATE(2008,10,31)))

all one line


Mike
 
worked perfectly...happy holidays

paul

Mike H said:
Hi,

Try this

=SUMPRODUCT((J2:J25="Homicide")*(A2:A25>=DATE(2008,10,1))*(A2:A25<=DATE(2008,10,31)))

all one line


Mike
 

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

Similar Threads


Back
Top