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 / June 2007

Tip: Looking for answers? Try searching our database.

2 Conditions + Sum of a colum matching those conditions

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jeffa - 07 Jun 2007 05:27 GMT
Ok.. I've spent the last 2 hours reading this area trying to find a close
enough match to what I am looking for. I know this will be simple.. but I've
ended up having to post.. I'm sorry :(.

This is what I have..

Col c = windows desktop or windows laptop
Col g = It's monthly $ charge
Col o = Who it is owned by (Finance companies)

I would like to have a breakdown of Desktops laptops with a cost item.. For
example

If col c = "Windows Desktop" & Col o = "HP Finance" Sum(g:g) (what's left
after the 2 conditions are met.

Hope that makes sense.. I'd love some help :)
Regards,

Jeffrey
Bob Phillips - 07 Jun 2007 09:46 GMT
=SUMPRODUCT(--(C2:C200="Windows Desktop"),--(O2:O200="HP Finance"),G2:G200)

Note that SUMPRODUCT doesn't work with complete columns, you have to specify
a range.

Signature

HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

> Ok.. I've spent the last 2 hours reading this area trying to find a close
> enough match to what I am looking for. I know this will be simple.. but
[quoted text clipped - 18 lines]
>
> Jeffrey
Jeffa - 08 Jun 2007 00:14 GMT
Bob,

Thank you so much for your help.. You are a stress saver!! :o)

> =SUMPRODUCT(--(C2:C200="Windows Desktop"),--(O2:O200="HP Finance"),G2:G200)
>
[quoted text clipped - 23 lines]
> >
> > Jeffrey
Pete_UK - 07 Jun 2007 09:52 GMT
You can use an array* formula like this:

=SUM(IF((C1:C100="Windows desktop")*(O1:O100="HP Finance"),G1:G100,0))

* As this is an array formula, then when you type it in (or
subsequently edit it) you must use CTRL-SHIFT-ENTER to commit it
rather than just ENTER. If you do this correctly then Excel will wrap
curly braces { } around the formula when viewed in the formula bar -
you must not type these yourself.

An alternative (non-array) formula is:

=SUMPRODUCT(--(C1:C100="Windows desktop"),--(O1:O100="HP
Finance"),G1:G100)

In both cases the array ranges should be the same size, but cannot be
a complete column - I've assumed you have 100 of them, so adjust this
to suit your data.

Hope this helps.

Pete

> Ok.. I've spent the last 2 hours reading this area trying to find a close
> enough match to what I am looking for. I know this will be simple.. but I've
[quoted text clipped - 16 lines]
>
> Jeffrey
Bob Phillips - 07 Jun 2007 10:16 GMT
Pete,

You don't need the ,0 at the end of this formula, FALSE doesn't sum. Saves a
bit of typing <G>

Signature

HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

> You can use an array* formula like this:
>
[quoted text clipped - 41 lines]
>>
>> Jeffrey
Pete_UK - 07 Jun 2007 10:56 GMT
Hi Bob,

yes, I know, and you have pointed it out to me in the past - I keep
doing it, it's ingrained in my psyche !! <bg>

Pete

> Pete,
>
[quoted text clipped - 55 lines]
>
> - Show quoted text -
 
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.