Search code examples
arraysif-statementgoogle-sheetscheckboxnested-if

How to set a cell value to zero if checkbox is checked


I have a sheet I and I want to have the values in one row be set to zero once the corresponding checkbox is clicked. Here is what my sheet looks like(https://postimg.cc/CBDdYsjN), I want each cell in column E to be set to zero when its same row checkbox in col A is set to true.


Solution

  • try in F2:

    =INDEX(IF(A2:A=TRUE; 0; E2:E))