Solved

How to calculate a summary with specific condition?

Posted on 2012-03-27
5
288 Views
Last Modified: 2012-06-27
Dear all, I've a Excel table which looks like below

Type       Count
A        2
A        3
B        4
B        5
C        6
C        7
C        7

And I would like to followings output:

Type      Total
A      5
B      9
C      20

Is there any function to accomplish this?
0
Comment
Question by:towo2002
5 Comments
 
LVL 6

Expert Comment

by:wshark83
ID: 37770726
you can just do a pivot table in excel and it will give you the desired output:

in excel go to data
select pivot table and pivot chart wizard
click next
select the table range
click next
click layout
select the "Type" field in row and count in the data (this should now show Sum of count).
click ok
and then finish
0
 
LVL 19

Expert Comment

by:helpfinder
ID: 37770729
yes, you can do Pivot table - check attached example
towo2002-sample.xlsx
0
 
LVL 11

Expert Comment

by:Runrigger
ID: 37770731
Put A in Cell A10, B in A11 and C in A12, then put the below formula in cell B10 and copy down to row 11 and 12

=SUMIF($A$2:$A$8,A10,$B$2:$B$8)

It assumes that your data is in cells A2:B8 (headers in row 1)
0
 
LVL 1

Author Comment

by:towo2002
ID: 37770751
Dear all,

How about I just have 4 types?  Let say A, B, C, D.  Is there any easy way to accomplish it?  Provit table is good but wanna prevent to use it.
0
 
LVL 19

Accepted Solution

by:
helpfinder earned 500 total points
ID: 37770811
then this SUMIF formula could be used for this. see attached sample (I left pivot as it was and added also columns (I, J, K, L) with formula)
towo2002-sample-V2.xlsx
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

No matter the version of Windows you are using, you may have some problems with Windows Search running too slow or possibly not running at all. Before jumping into how you can solve this issue, just know there are many other viable alternative deskt…
Using Word 2013, I was experiencing some incredible lag when typing.  Here's what worked for me....
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

930 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now