View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Phillips
 
Posts: n/a
Default AVERAGEIF AND SUMIF AND COUNTIF

Kathi,

I am not sure what to do when the start date is in one quarter and the end
date is in another, but assuming you count from the start date quarter, try
this

=AVERAGE(IF(INT((MONTH(B2:B20)+2)/3)=4,C2:C20-B2:B20))

which is an array formula, it should be committed with Ctrl-Shift-Enter, not
just Enter.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"kathi" wrote in message
...
I have a column with open date (B), column with closed date (C), column

with
count of days opened (D).
I need to calculate the average number of days each were opened in the

1st,
2nd, 3rd and 4th quarter of the fiscal year as well as the entire fiscal

year.
I have been physicallly typing in each cell reference that has an opening
date int he first quarter, but would like to be able to say SUM COLUMN D

ONLY
IF COLUMN B "=10/01/2004" also "<=12/31/2004".
THEN COUNTIF COLUMN B ONLY IF "=10/01/2004" ALSO "<=12/31/2004"