View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Teethless mama Teethless mama is offline
external usenet poster
 
Posts: 3,718
Default Countif Multiple Criteria

=SUMPRODUCT(--(D9:D55DATEVALUE("12/31/2006")),--(D9:D55<=K1),E9:E55)/(COUNTIF(D9:D55,"12/31/2006")-COUNTIF(D9:D55,K1))

"jackie" wrote:

Hi-

The following array formula is working for me:
=(SUMPRODUCT(--(D9:D55DATEVALUE("12/31/2006")),(--(D9:D55<=K1)),E9:E55))/(COUNTIF(D9:D55,"12/31/2006")-COUNTIF(D9:D55,"5/31/2007")).

However I would like for 5/31/2007 to be a cell reference of K1. I want to
be able to change just K1 each month. I can not get this to work with a cell
reference. Column D has dates and Column E is numbers.

Thanks again.