Reputation: 982
i have data given below in Google Sheet
jumlah tanggal
1 Rp15.000 15-Apr-2020
2 Rp15.000 15-Mei-2020
3 Rp15.000 15-Jun-2020
4 Rp15.000 15-Jul-2020
5 Rp15.000 18-Agu-2020
6 Rp15.000 15-Sep-2020
7 Rp15.000 20-Okt-2020
8 Rp15.000 18-Nov-2020
9 Rp15.000 12-Des-2020
10 Rp15.000 11-Jan-2021
11 Rp15.000 15-Feb-2021
12 Rp15.000 15-Mar-2021
how can i only sum column "jumlah" only from year 2020?
[update]
i'm already follow some answer but it's still error
Upvotes: 0
Views: 131
Reputation: 982
thank you for people who trying to help. So far i'm trying every solution above but it doesn't work. I googling many times for everyday then get the solution.
here's the formula:
=SUMPRODUCT((YEAR(C3:C)=2020)*B3:B)
here's the link to the sites: https://www.excel-easy.com/examples/sumproduct.html
Upvotes: 0
Reputation: 4247
You could try:
=sumproduct(year(C2:C)=2020, B2:B)
You will need to exclude row 1 as C1 is not a date and year(C1)
will give an error.
This formula creates a column of true/false values depending on whether the year is 2020 or not. Then multiples that column with the values in column B. And then adds it all up.
Upvotes: 1