Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 661
Default Counting values based on multiple conditions

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
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,393
Default Counting values based on multiple conditions

=SUMPRODUCT(--(J2:J1500="Homicide"), --(A2:A1500=DATEVALUE("10/1/2008")),
--(A2:A1500<=DATEVALUE("10/31/2008)) )
For more details on SUMPRODUCT
Bob Phillips
http://www.xldynamic.com/source/xld.SUMPRODUCT.html
J.E McGimpsey
http://mcgimpsey.com/excel/formulae/doubleneg.html
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"Paul" wrote in message
...
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



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default Counting values based on multiple conditions

Hi,

Try this

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

all one line


Mike

"Paul" wrote:

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

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 661
Default Counting values based on multiple conditions

worked perfectly...happy holidays

paul

"Mike H" wrote:

Hi,

Try this

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

all one line


Mike

"Paul" wrote:

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

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default Counting values based on multiple conditions

Your welcome, glad I could help

"Paul" wrote:

worked perfectly...happy holidays

paul

"Mike H" wrote:

Hi,

Try this

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

all one line


Mike

"Paul" wrote:

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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Counting for multiple conditions J. Catz. Excel Worksheet Functions 2 December 11th 07 11:12 PM
Help with counting multiple conditions jstro01 Excel Discussion (Misc queries) 3 April 27th 07 09:50 PM
Counting based upon 2 conditions that are text based walkerdayle Excel Discussion (Misc queries) 7 August 22nd 06 01:29 AM
Cell values based upon multiple conditions Ryan M via OfficeKB.com New Users to Excel 2 July 19th 05 02:10 AM
counting based on 2 conditions Thrava Excel Discussion (Misc queries) 3 December 8th 04 10:19 PM


All times are GMT +1. The time now is 01:58 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"