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 / New Users / June 2006

Tip: Looking for answers? Try searching our database.

How to sum up the data which match two criteria?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Macneed - 20 Jun 2006 01:13 GMT
How to sum up the data which match two criteria?

e.g.
A    Home    BB Call   80
B    Office  Mobile    8370
C    Home    Mobile    870
D    Home    BB Call   860
E    Office  BB Call   850
G    Home    Mobile    480
H    Office  Mobile    380
I    Home    BB Call   10

Is it possible to sum up all match "Home" and "Mobile" by a formula?
870 + 480

Thanks a lot
Pete_UK - 20 Jun 2006 01:53 GMT
Assuming your first description is in column B, your second description
in column C and your numbers (cost?) in column D, and that your data
spans rows 1 to 100 (adjust to suit), then try this formula in G1:

=SUM(IF((B$1:B$100="Home")*(C$1:C$100="Mobile"),D$1:D$100,0))

This is an array formula, which means that once you have typed it in
(or subsequently edit it) you need to use CTRL-SHIFT-ENTER instead of
just ENTER. If you do this correctly, then Excel will wrap curly braces
{ } around the formula - you must not type these yourself.

You could enter "Home" into cell E1 and "Mobile" into cell F1, and then
the formula could be changed to:

=SUM(IF((B$1:B$100=E1)*(C$1:C$100=F1),D$1:D$100,0))

(again, CSE to commit). This formula could be copied down column G,
with appropriate entries in E and F to give you sums between other
destinations.

Hope this helps.

Pete

> How to sum up the data which match two criteria?
>
[quoted text clipped - 12 lines]
>
> Thanks a lot
Jimmy Joseph - 21 Jun 2006 12:08 GMT
Hello,

What if we use sumproduct

=SUMPRODUCT(--(B$1:B$100="Home"),--(C$1:C$100="Mobile"),D$1:D$100)

I would like to know the difference in usage of sum(if())) and
sumproduct formulas.

Regards,

Jimmy Joseph
 
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.