If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Can function be applied to range in sumif prior to criteria check?
Hi all,
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 |
#2
|
|||
|
|||
Can function be applied to range in sumif prior to criteria check?
You may find it easier to use SUMPRODUCT, rather than SUMIF.
-- David Biddulph "Cheese_whiz" wrote in message ... Hi all, 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 |
#3
|
|||
|
|||
Can function be applied to range in sumif prior to criteria check?
No, use SUMPRODUCT
=SUMPRODUCT(--(MONTH(date_range)=1),--(date_range""),amount_range) -- --- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "Cheese_whiz" wrote in message ... Hi all, 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 |
#4
|
|||
|
|||
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 |
#5
|
|||
|
|||
Can function be applied to range in sumif prior to criteria ch
Thanks for the replies!
I finally got it going by using Bob's code as a starting point. Thanks again for all the replies, CW "Bob Phillips" wrote: No, use SUMPRODUCT =SUMPRODUCT(--(MONTH(date_range)=1),--(date_range""),amount_range) -- --- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "Cheese_whiz" wrote in message ... Hi all, 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 |
Thread Tools | |
Display Modes | |
|
|