Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How to calculate a summary with specific condition?

Posted on 2012-03-27
5
Medium Priority
?
301 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 2000 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

Office 365 Training for Admins - 7 Day Trial

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

Question has a verified solution.

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

Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
Microsoft has changed the look and feel of Azure AD and Microsoft account sign-in pages so that you will have a more unified look and feel when moving between the two interfaces.
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

670 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