• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 304
  • Last Modified:

How to calculate a summary with specific condition?

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?
1 Solution
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
helpfinderIT ConsultantCommented:
yes, you can do Pivot table - check attached example
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


It assumes that your data is in cells A2:B8 (headers in row 1)
towo2002Author Commented:
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.
helpfinderIT ConsultantCommented:
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)
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now