R
R
Roman Pashkov2018-07-02 08:59:55
excel
Roman Pashkov, 2018-07-02 08:59:55

How to write a formula in Docs or Excel?

There are three columns. The first contains numbers, the second contains the user ID, and the third also contains IDs. It is necessary that the id from the third column is searched for in the second, and if it matches, it takes the number of that from the first column and sums it up. Example: prntscr.com/k1gor5

Answer the question

In order to leave comments, you need to log in

3 answer(s)
D
DS28, 2018-07-02
@DS28

Formula SumIf() (or SumIfMl() )
I assume the records come from cell A1, then
D1=SUMIFS(A:A;B:B;C1)
Help link

S
Saboteur, 2018-07-02
@saboteur_kiev

If you swap the columns so that there is an ID, the desired value, ID, then you can use the VLOOKUP function (section statistics and arrays):
5b39d3dc2acaf512943812.png

U
urcosmos, 2018-07-10
@urcosmos

Roman, it's not entirely clear what should be summed up with what. Therefore, a variant of part of the solution:
The formula in cell D1 (in the rest, stretch down the square in the lower right corner of the cell):
=INDEX($A1:$C1;MATCH($C1;$B1:$B1;0);1)
Meaning in that in cell D1 (D2, D3, etc.) the values ​​from A1 (A2, A3, etc.) will be inserted, provided that the value from C1 matches the value from B1 (etc. ). And then you can add to the result what you need according to your idea.
INDEX is an INDEX in Russian. versions.
MATCH is POISKPOZ in Russian. versions.
To avoid errors, you can check for an error:
=IFERROR(INDEX($A1:$C1;MATCH($C1;$B1:$B1;0);1);"")
IFERROR is IFERROR in Russian. versions.
Specify the condition of the problem, if the question is still relevant.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question