V
V
Victor Sawitcky2020-04-18 13:11:53
Google Sheets
Victor Sawitcky, 2020-04-18 13:11:53

How to write a formula that, given a selection of values ​​from column 1, will calculate the sum of the products of the values ​​from columns 2 and 3?

There is a certain attribute of the product (for example, color) located in column 1, the quantity of the product in column 2 and the cost of the product in column 3. I want to display the total cost of the product of certain colors (say, blue and green) in some cell. In general, given a selection of values ​​from column 1, get the sum of the products of the values ​​from columns 2 and 3.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Ivanov, 2020-04-18
@sawitcky

Several formulas can do this. SUMPRODUCTone of them
=SUMPRODUCT(--(A2:A13=E2);B2:B13;C2:C13)
5e9b5dc6288fd038068141.png
https://docs.google.com/spreadsheets/d/1de6iUgnlx0...
I was told that the cons --are a relic. Type checking can be skipped.
=SUMPRODUCT(A2:A13=E2;B2:B13;C2:C13)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question