I want to sum up each entries of column 2 corresponding to the date in column 1 so that I can insert the formula into the first cell in column 3 and drag&drop it to the end of the column.
Tried: =XLOOKUP(A52;A52:B63;2) and some macros but without macro experience
Expecting: Excel Screenshot. Column 3 expecting
You don't need a macro. Its need only a
IF(to hide the value when it's not the final date's row) and aSUMIF(to sum conditionally if the date is the same as the current row's one).Considering your columns are A, B and C, it's just to put the following formula in C1 and drag it to the end:
If your columns aren't A, B and C, just change the respective ones.
EXPLANATION: It's pretty straightforward, but there are two parts.
SUMIF(A:A;A1;B:B)sums all values in column B whenever the date in column A is the same as the date in A1 (documentation).IF(A1<>A2;SUMIF(etc);"")shows the sum only when the date in the current row is different from the next one (documentation).In your example, the result for 2022-10-07 is not the sum; I'll take it as a mistake from your example. If it's an intended effect (with some logic other than a simple sum), explain it in comments.