Search code examples
if-statementgoogle-sheetscheckboxsumgoogle-sheets-formula

Google sheets checkmark conditional Formating


I need help with Google spreadsheet checkmark conditional formatting. Please see the image for a better understanding. When I click on the C2 cells checkmark then automatically A2 cells $10 will be selected and added to the E5 cells. When I click on the B6 checkmark then automatically A6 cells $40 will be selected and added to the E5 cells. Summary of the concept: When I checkmark any cells (from B2 to B9 & C2 to C9) the same row (From A column) number will be added automatically to the specific cells(to E5 cells). How do I do it?

Sheet Link (I have given edit permission, you can edit it) - Go to sheet link

enter image description here


Solution

  • try:

    =INDEX(SUM(IF(B2:C9=TRUE, A2:A9, 0)))
    

    enter image description here

    or:

    =INDEX(SUM(IF((B2:B9=TRUE)+(C2:C9=TRUE), A2:A9, 0)))
    

    enter image description here

    or try:

    =SUMPRODUCT((B2:B9=TRUE)*(C2:C9=TRUE)*A2:A9)
    

    =SUMPRODUCT(((B2:B9=TRUE)+(C2:C9=TRUE))*A2:A9)