Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to SUM column while using a condition on each cell

I’m using Google Sheets and i have a table with 2 columns: PRICE(A) and REQUIRED(B):

--------------------
| PRICE | REQUIRED |
--------------------
| 10000 | *        |
|  1200 | *        |
|  1550 |          |
|  5000 |          |
| 12000 | *        |
--------------------

I need to calculate the SUM of the column A (PRICE) but only if REQUIRED is set (has a star)
so basically i need to go through the PRICE column, and check each cell to see if the REQUIRED cell is set for it.

How can i accomplish this ?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

sumif() would suffice

=sumif(<Required_column>, "*", <Price_column>)

example: =sumif(B:B,"*",A:A)

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading