Q:

Excel: SUM multiple lines by YEAR

I need a formula to sum the amount of dividends payed per year.
Column A shows the date and column B shows the amount payed.
Example of my data: https://i.stack.imgur.com/layJy.png
I've tried IF with SUM, SUMIF, VLOOKUP, etc., but no success.
Thanks.

A:

Looking at your need, it seems that Pivot Table is your Solution instead of using if, Sum or anything else.
You can watch this example from Efficiency 365: Pivot Table Date Grouping Tutorial: How to group on year, month, quarter, day, or hour
Here is your end result:

