View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
joel joel is offline
external usenet poster
 
Posts: 9,101
Default How to weave in Date Information please?

Rather than use countif and average use two sumproducts where the first
sumproduct is the total and the 2nd sumproduct is the quantity. the two
sumproducts are identical except for the term 'Raw Data'!$C$4:$C$5000. I
made column A the date which you didn't specify.


=sumproduct(--('Raw Data'!$H$4:$H$5000) = "Barb B"),--(date(7,1,2009)<='Raw
Data'!$A$4:$A$5000),--(date(9,30,2009)='Raw Data'!$A$4:$A$5000,'Raw
Data'!$C$4:$C$5000)/sumproduct(--('Raw Data'!$H$4:$H$5000) = "Barb
B"),--(date(7,1,2009)<='Raw Data'!$A$4:$A$5000),--(date(9,30,2009)='Raw
Data'!$A$4:$A$5000)

"Danny Boy" wrote:

The Formula below works, however I'm having difficulty integrating "date"
parameters into them.

In Column A of the Raw Data spreadsheet I have "Discharge Dates". I want the
two formulas below to work on all data inpuut between July 1, 2009 and up
until Sept 30, 2009. Any data input before or after the date parameters
identified would not register in the calculations. Could someone assist me in
incorporating the appropriate "date" parameters into the formulas below.
Thank you! Dan

=IF(COUNTIF('Raw Data'!$H$4:$H$5000,"Barb B"),AVERAGE(IF('Raw
Data'!$H$4:$H$5000="Barb B",'Raw Data'!$C$4:$C$5000)),"")


=IF(COUNTIF('Raw Data'!$F$4:$F$5000,"OP"),AVERAGE(IF('Raw
Data'!$F$4:$F$5000="OP",'Raw Data'!$C$4:$C$5000)),"")