Summarize Based on Year

kumara_faith

Well-known Member
Hi,

I have the following table:

Book1
CDEFGHIJK
2Table 1Table 2
3PriceYearShareDividendYearShareDividend
42/5/20152015125201516185
53/5/20152015121002016680
68/7/201520153602017445
71/5/20162016125
88/7/20162016555
99/2/20172017445
Sheet2

In Table 1, I have my input sheet. In Table 2, I am trying to summarize the total shares and dividend for each year. The correct results is in Table 2. Is there a way to use a formula to achieve this ? Appreciate all the help.

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
as the year is just shown as text a sumif() should do
=SUMIF(\$B\$3:\$B\$8,\$G3,C\$3:C\$8)
Book1
ABCDEFGHI
1Table 1Table 2
2PriceYearShareDividendYearShareDividend
3421262015125201516185
4421272015121002016680
54219320153602017445
6424912016125
7425592016555
8427752017445
9
Sheet1
Cell Formulas
RangeFormula
H3:I5H3=SUMIF(\$B\$3:\$B\$8,\$G3,C\$3:C\$8)

For Year, in G3 copy down
Excel Formula:
``=IFERROR(INDEX(\$B\$3:\$B\$100,AGGREGATE(15,6,ROW(\$B\$3:\$B\$100)/((\$B\$3:\$B\$100<>"")*ISERROR(MATCH(\$B\$3:\$B\$100,\$G\$2:\$G2,0))),1)-ROW(\$A\$2)),"")``
For Share and Dividend use etaf's formula.

Hi etaf and kvsrinivasamurthy,

Thank you for the solution. It worked and appreciate your patience and valuable time. Have a great day ahead.?

you are welcome

Replies
1
Views
106
Replies
0
Views
260
Replies
0
Views
55
Replies
11
Views
400
Replies
7
Views
363

1,206,814
Messages
6,075,023
Members
446,114
Latest member

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back