View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default SumProd from 2 columns and date range

Untested, but something like should work:
=SUMPRODUCT((Overall!H8:H3000=A1)*(Overall!H8:H30 00<B2)*(ISNUMBER(SEARCH(A2,Overall!F8:F3000))))

where you would input in
A1 = StartDate in full, eg enter: 1 Jan 2009
B2 = "EndDate" which is the 1st of the next month, eg enter: 1 Nov 2009 (if
you want to capture it till end Oct 09). The operator "<" in "<B2" is
intentional. If you do it like this for the enddate, you don't have to worry
which date is the last date of any month/yr

Any good? hit the YES below
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:27,000 Files:200 Subscribers:70
xdemechanik
---
"roy.okinawa" wrote:
I have looked through a few answers here but can't find my solution. I keep
getting Value# or a wrong total.

I want to sumproduct from 2 columns when meeting select criteria and dates.
I use this for now for only one date (i.e. Oct 2009)

=SUMPRODUCT(--(TEXT(Overall!H8:H3000,"mmm/yyyy")=TEXT(A1,"mmm/yyyy")),--(ISNUMBER(SEARCH(A2,Overall!F8:F3000))))

I want to be able to enter Jan 09 in A1 and Oct 09 in B2 and have that
search and sum total for A2 criteria. All months between Jan/Oct are
included. Date ranges (A1, B2) can change, as well as criteria (A2.)

Thanks.