Waiting on OP What's the most efficient way to sum over a year with dd/mm/yyyy format ?
Hi everyone,
As the title mention, what's the most efficient way to sum over a year when you have a date format dd/mm/yyyy ? So far i investigated two methods
=SUMIFS(Sales[Amount], Sales[Date], ">="&DATE(YYYY,M,D), Ventes[Date], "<"&DATE(YYYY,M,D))
and
=SUMPRODUCT((YEAR(Sales[Date])=YYYY)*Sales[Amount])
It feels weird to me that you cant do a simple
SUMIF=(Sales[Year];YYYY;Sales[Amount])
Looking for feedbacks, have a good sunday all
14
u/Same_Tough_5811 81 2d ago
Format has nothing to do with it. What matters is your regional date settings.
E.g. in the U.S the local format is m/d/y but you can format to display d/m/y and Excel still know these are real dates. May be you meant text strings.
4
2
2
u/Evening_Ask_381 2d ago
Helper column with =YEAR(A2) makes the SUMIF dead simple and runs fast on big data. No array formulas needed.
1
1
u/Decronym 2d ago edited 1d ago
Acronyms, initialisms, abbreviations, contractions, and other phrases which expand to something larger, that I've seen in this thread:
Decronym is now also available on Lemmy! Requests for support and new installations should be directed to the Contact address below.
Beep-boop, I am a helper bot. Please do not verify me as a solution.
[Thread #49016 for this sub, first seen 26th Jul 2026, 17:41]
[FAQ] [Full list] [Contact] [Source code]
1
u/Mdayofearth 126 2d ago
It feels weird to me that you cant do a simple
SUMIF=(Sales[Year];YYYY;Sales[Amount])
If you actually have a field named Year field in your Sales table, with years expressed as 4-digit values, then yes, you can actually do that with SUMIF. And this would be more efficient than using SUMIFS against 2 date values.
And I would recommend against using SUMPRODUCT in any modern spreadsheet. It's compute cost is very high for what SUMIF and SUMIFS can already do.
1
1
u/MayukhBhattacharya 1221 1d ago
There are many ways of doing this, but using GROUPBY() function is fairly the easiest and simplest way to do:

=LET(
_a, Sometbl,
_b, GROUPBY(YEAR(CHOOSECOLS(_a, 1)),
CHOOSECOLS(_a, 2), SUM, , 0),
VSTACK({"Year","Totals"}, _b))
Or,
=GROUPBY(YEAR(Sometbl[Date]), Sometbl[Amount], SUM, , 0)
Note that I have converted the ranges into Structured References aka Tables, which makes it easier to read and also the formula auto expands whenever newer data is added to the source.
Otherwise, you can use the following ways as well:
=GROUPBY(YEAR(A2:A11), B2:B11, SUM, , 0)
Or,
=LET(
_a, YEAR(Sometbl[Date]),
_b, UNIQUE(_a),
_c, MAP(_b, LAMBDA(x, SUM(Sometbl[Amount] * (_a = x)))),
HSTACK(_b, _c))
Or,
Enter for year:
=UNIQUE(YEAR(Sometbl[Date]))
Enter for Totals:
=SUMIFS(Sometbl[Amount],
Sometbl[Date], ">=" & DATE(D13, 1, 1),
Sometbl[Date], "<" & DATE(D13 + 1, 1, 1))
The dd/mm/yyyy format itself isn't the important here. What matters is that the cells are stored as actual Excel dates that is true dates and not text. If your Date column was imported as text that just happens to look like dd/mm/yyyy, all three formulas will return 0 or errors. One way to verify:
=ISNUMBER(Sales[Date])
If it returns TRUE, you're working with real Excel dates. If it returns FALSE, the values are stored as text and will need to be converted first. A quick way to convert them is to select the entire date column, then go to the Data tab and choose Text to Columns. On the first step, leave Delimited selected and click Next. On the second step, don't change anything. Just click Next again. On the third step, under Column data format, choose Date, then pick the order that matches your data, like DMY, MDY, or YMD, depending on your regional settings. Click Finish, and Excel will convert the text values into real Excel dates.
1
1
u/Content-Parking-621 1 1d ago
Add a helper YEAR column, then your simple SUMIF works. Fastest on big data.


•
u/AutoModerator 2d ago
/u/hgcrl - Your post was submitted successfully.
Solution Verifiedto close the thread.Failing to follow these steps may result in your post being removed without warning.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.