A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Can function be applied to range in sumif prior to criteria check?



 
 
Thread Tools Display Modes
  #1  
Old January 8th, 2008, 01:22 PM posted to microsoft.public.excel.worksheet.functions
Cheese_whiz
external usenet poster
 
Posts: 391
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  
Old January 8th, 2008, 01:43 PM posted to microsoft.public.excel.worksheet.functions
David Biddulph
external usenet poster
 
Posts: 8,714
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  
Old January 8th, 2008, 01:47 PM posted to microsoft.public.excel.worksheet.functions
Bob Phillips
external usenet poster
 
Posts: 5,994
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  
Old January 8th, 2008, 01:51 PM posted to microsoft.public.excel.worksheet.functions
Max
external usenet poster
 
Posts: 8,574
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  
Old January 8th, 2008, 02:49 PM posted to microsoft.public.excel.worksheet.functions
Cheese_whiz
external usenet poster
 
Posts: 391
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




 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 09:49 PM.


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