A
A
Amir2020-06-07 12:36:50
Google Sheets
Amir, 2020-06-07 12:36:50

How to sum with a condition?

Good afternoon.
The question is:
There are two sheets (Sheet1, Sheet2). The first one has column A with dates. Column B with numbers
The second sheet has a column A with dates, and column B of Sheet2 should be with the sum of all the numbers of column B of Sheet1, the date A of Sheet1 that is not greater than the date A of Sheet2
Example:
Sheet1:
5edcb4ba49098421247125.png
Sheet2:
5edcb4df5ec37719185757.png
I have no idea at all. I'm trying to play with SUMIF, but nothing comes out at all. Please, help.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
Grigory Boev, 2020-06-07
@Guedda

There are a couple of killer features in Google Sheets, namely FILTER () and QUERY ()
The first one will suit you (enter into Sheet2 B1, spread down )
=СУММ( FILTER(Лист1!B:B;Лист1!A:A<=A1) )
: which Sheet1!A:A<=A1 . What happens is cumulative.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question