View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Can function be applied to range in sumif prior to criteria check?

Think you could try sumproduct to get the result directly

Assuming real dates in A2 down, values to be summed in B2 down
then in say, C2, something like this, either:
=SUMPRODUCT((MONTH(A2:A10)=2)*B2:B10)
or
=SUMPRODUCT((TEXT(A2:A10,"mmmyy")="Feb08")*B2:B10)
the latter sums col B for dates falling within a particular month-yr
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Cheese_whiz" wrote:
I have a range of dates I'm using for the first argument in a sumif
function. I need to convert those dates to a single month number (one for
each date) prior to running the criteria check found in the second argument
of the sumif function.

Is that possible?

tahnks,
CW