Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Worksheet Functions / August 2006

Tip: Looking for answers? Try searching our database.

Sum column information based on multiple criteria

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
GHawkins - 23 Aug 2006 20:00 GMT
I've read the posts on using "sumprodut" instead of "sumif", but I'm either
doing something wrong or using "sumproduct" isn't the right tool for what I'm
doing. Here's my problem:
If $A$8:$A$23 = 660010 and if $B$8:$B$23 = "Ideation", sum $C$8:$C$23.
If the value in column A meets my criteria and the value in column C meets
my criteria, I want to find the corresponding cell in column C and add them
together...

Col A        Col B       Col C
660010     Ideation    $5
665511     Ideation    $2
660010     Concept    $6
660010     Ideation    $5

Based on the above information, I would want my formula to return $10, since
the first and last rows contain the correct criteria. I've tried many things
- sumif (which only allows for one criteria), nested if statements, using ifs
and ands....I've been looking at it so hard that my mind has gone blank. Can
anyone help?

Much appreciated!!
Dave F - 23 Aug 2006 21:52 GMT
Have you tried entering your formula as an array formula?
Signature

Brevity is the soul of wit.

> I've read the posts on using "sumprodut" instead of "sumif", but I'm either
> doing something wrong or using "sumproduct" isn't the right tool for what I'm
[quoted text clipped - 17 lines]
>
> Much appreciated!!
GHawkins - 23 Aug 2006 22:04 GMT
I tried the following formula:

Col A        Col B       Col C
660010     Ideation    $5
665511     Ideation    $2
660010     Concept    $6
660010     Ideation    $5

=sum(if((A1:A4="660010")*(B1:B4="Ideation"),C1:C4)), and then using the
Ctrl+Shift+Enter to calculate. This returns 0 instead of the 10 I'm
expecting. Am I doing something wrong?

> Have you tried entering your formula as an array formula?
>
[quoted text clipped - 19 lines]
> >
> > Much appreciated!!
Dave F - 23 Aug 2006 22:13 GMT
Try:

=SUMIF((A1:A4="60010")*(B1:B4="Ideation"),C1:C4) and hit CTRL+SHIFT+ENTER

(note the difference in my formula is you're using the SUMIF function not
the SUM function as in your formula below).

Dave
Signature

Brevity is the soul of wit.

> I tried the following formula:
>
[quoted text clipped - 31 lines]
> > >
> > > Much appreciated!!
GHawkins - 23 Aug 2006 22:27 GMT
This does not work - it prompts me that I've entered too few arguments. The
suggestion of using the SUMPRODUCT does end up working (see post from Ik)
unless there are null values in my range.

> Try:
>
[quoted text clipped - 40 lines]
> > > >
> > > > Much appreciated!!
lk - 23 Aug 2006 22:14 GMT
=sumproduct(--($A$8:$A$23=660010),--($B$8:$B$23="Ideation"),$C$8:$C$23)

if the data in A8:A23 is text, you will need to change the 660010 to "660010".

> I've read the posts on using "sumprodut" instead of "sumif", but I'm either
> doing something wrong or using "sumproduct" isn't the right tool for what I'm
[quoted text clipped - 17 lines]
>
> Much appreciated!!
GHawkins - 23 Aug 2006 22:24 GMT
That works like a charm! Is there a way to allow null values in the range? In
the event that A11 is NULL?

> =sumproduct(--($A$8:$A$23=660010),--($B$8:$B$23="Ideation"),$C$8:$C$23)
>
[quoted text clipped - 21 lines]
> >
> > Much appreciated!!
lk - 23 Aug 2006 22:38 GMT
Sumproduct, with the "--", assigns a value of 1 (if true) and 0 (if false) to
your conditions, then it multiplys the value of the conditions (1's and/or
0's) by your last data range.  So if all the conditions are true, you get
1*1*data range (for that row only).  If you have a NULL, in your example, it
will be assigned a value of zero.

(Ssorry this isn't a very eloquent answer.  There are lots of websites with
more Sumproduct info.)

> That works like a charm! Is there a way to allow null values in the range? In
> the event that A11 is NULL?
[quoted text clipped - 24 lines]
> > >
> > > Much appreciated!!
GHawkins - 24 Aug 2006 13:57 GMT
That helps a lot - thanks for all the help!

> Sumproduct, with the "--", assigns a value of 1 (if true) and 0 (if false) to
> your conditions, then it multiplys the value of the conditions (1's and/or
[quoted text clipped - 33 lines]
> > > >
> > > > Much appreciated!!
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.