google-sheetsgoogle-sheets-formula

Google Sheets: Sumif formula


I need to create a formula to sum the values as shown in the picture. Cells in column B should sum the values in Row 2 if the right checkbox is checked in Row 3. Please, take a look at the capture. I also post the link to editable google sheet file.

Value in B3 (10) should be the result generated by the formula.

The formula must work also in cells: B4 and B5.

https://docs.google.com/spreadsheets/d/1kwGhbgK6-7rDF5FzIZnilO86F-6myY71sdZCaBU4gQs/edit?usp=sharing enter image description here


Solution

  • You may try:

    =sumproduct(C2:E2;C3:E3)
    

    array-style

    =byrow(C3:E;lambda(Σ;if(counta(Σ)=0;;sumproduct(C2:E2;Σ))))