View Single Post
  #16   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Don Guillett
 
Posts: n/a
Default AVERAGEIF AND SUMIF AND COUNTIF

Should be where e7 and e8 have your desired dates.
=AVERAGE(IF((CHECKS!$A$7:$A$291=E7)*(CHECKS!$A$7: $A$291<=E8),CHECKS!$D$7:$D$291))
or
AVERAGE(IF((CHECKS!$A$7:$A$291=DATEVALUE("10/1/2005"))*(CHECKS!$A$7:$A$291<=DATEVALUE
("10/5/2005")),CHECKS!$D$7:$D$291))

The checksA was a defined name for the range.

--
Don Guillett
SalesAid Software

"Don Guillett" wrote in message
...
adapt this array formula to your criteria. Don't forget to use
ctrl+shift+enter for entering/editing.

=AVERAGE(IF(ChecksA=O1,ChecksA<O2,ChecksD))

=AVERAGE(IF(a2:a200=O1,a2:a200<O2,d2:d200))

Don Guillett
SalesAid Software

"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"