Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How to calculate a summary with specific condition?

Posted on 2012-03-27
5
Medium Priority
?
302 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 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

Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

Question has a verified solution.

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

This article helps those who get the 0xc004d307 error when trying to rearm (reset the license) Office 2013 in a Virtual Desktop Infrastructure (VDI) and/or those trying to prep the master image for Microsoft Key Management (KMS) activation. (i.e.- C…
Cancel future meetings from user mailboxes in Office 365 using Remove-CalendarEvents
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

971 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