V
V
Volgastyle2021-05-25 16:32:53
Google Sheets
Volgastyle, 2021-05-25 16:32:53

Formula Sum over multiple dates in another sheet of Google Sheets?

If sheet 1 with columns Account, Date, Operation, Amount on one sheet

60acfb7498232879932561.png

On sheet 2 there are columns Date, Amount

60acfb850145b882076336.png

On Sheet 1 there are many dates for several years on different accounts with different amounts and different operations.

Task: You need to find out the amount for the month to which the date from the Date column of Sheet 1 belongs.

For example: the first column contains the date 01/01/2020. The formula should refer to this cell, understand that this is the month of January 2020, go to Sheet 1 and sum up all the numbers for January 2021 for a specific account and for a specific operation

UPD: While waiting for an answer, I found such a working option by trial and error, maybe who will need

=SUMIFS('Funds flow'!D:D, 'Funds flow'!A:A,$A$4, 'Funds flow'!C:C,"Account replenishment", ARRAYFORMULA(MONTH(' Cash flows'!B:B)&YEAR('Cash flows'!B:B)),MONTH(A6)&YEAR(A6))

My problem was exactly in date conversion, ARRAYFORMULA seems to have solved this issue. At the same time, this part should be at the end, when the formula did not work in other places, or I did something wrong again. In short, ARRAYFORMULA must be added to the usual formula with SUMIFS criteria. Can anyone suggest an easier way.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Oleg, 2021-05-25
@Oleg_F

Alternatively, I suggested the following
On sheet 1, write the formula =CONCATENATE(MONTH(date cell reference);YEAR(date cell reference))
On sheet 2, use the formula =SUMIFS('range to sum;range with formula on sheet 1, which was done above
; + year.
You can probably also do everything through one formula, for example QUERY, but I don’t know it very well, so I won’t tell you

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question