-2

Considering this scenario with an example I require

Excel function that provides a solution for the following problem

Column A and B have the following entries. D has the unique values of column A

    A    B    C    D    E
1   x   10         x    25
2   y   20         y    30
3   x   15
4   y   10

So the Output will be displayed on the Columns E with the sum of the corresponding values in column B

2 Answers2

3

try this in or

=sumifs(b:b, a:a, d1)
2

One simple way to do things like aggregation on your Excel table is to use a pivot table. Just add headers for the A and B columns, then highlight your data and insert a pivot table. Here is a screen shot:

enter image description here

And here is a screen capture showing how I configured the pivot table:

enter image description here

Tim Biegeleisen
  • 502,043
  • 27
  • 286
  • 360
  • Is there a more dynamic way? If I add more entries, it should automatically pick them up and add – Sylvester Das Oct 29 '18 at 08:07
  • 1
    If you're asking whether new `var` categories, and their sums, would automatically appear, then the answer is yes, they would. If you have requirements other than this, then state them, and maybe I can update my answer. – Tim Biegeleisen Oct 29 '18 at 08:08