Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 25
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,593
Default 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   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

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 25
Default 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




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
for SUMIF function, how do I use 2 sets of range & criteria Bob Excel Worksheet Functions 6 January 10th 06 07:48 PM
sumif when criteria is a range jeremy via OfficeKB.com Excel Discussion (Misc queries) 7 August 15th 05 05:49 PM
SUMIF with AND for range and criteria davidm_ba Excel Worksheet Functions 3 August 2nd 05 01:31 PM
SUMIF using two columns in both Range and Criteria Gordon Excel Discussion (Misc queries) 5 June 29th 05 06:56 PM
SUMIF using two columns in both Range and Criteria Gordon Excel Worksheet Functions 5 June 29th 05 06:56 PM


All times are GMT +1. The time now is 08:54 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"