View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ron Rosenfeld Ron Rosenfeld is offline
external usenet poster
 
Posts: 5,651
Default Averaging data if within a date range

On Fri, 19 Oct 2007 06:26:00 -0700, KellyF
wrote:

Hi,

I want to average data on a monthly basis. My worksheet looks like this:

Q
"Offered"
8-Jun-06
14-Jun-06
15-Jun-06
3-Jul-06

R
Time to Fill ("TTF")
45
34
51
29

So I want to calculate the average of the data in column R ("TTF") if column
Q ("Offered") is between 1-Jun-06 and 30-Jun-06, and so on for each month.

Please help! I'm only self-taught on excel and this has got me completely
stuck!


When you write "between" 1-Jun and 30-Jun I am assuming you mean to INCLUDE
those two dates and that you do not really mean "between".

Something like:

=(SUMIF(Q:Q,"="&date(2006,6,1),R:R) -
SUMIF(SUMIF(Q:Q,""&date(2006,6,30),R:R))
/
(COUNTIF(Q:Q,"="&date(2006,6,1))-COUNTIF(Q:Q,""&date(2006,6,30)))


--ron