Solved

How to calculate a summary with specific condition?

Posted on 2012-03-27
5
287 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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

757 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

19 Experts available now in Live!

Get 1:1 Help Now