Question

I have a value in one table and a checkbox in another. I would like the value to go up by 1 when the box is checked. I want to do something like this:

=IF(C23,B4=B4+1)

but Excel throws an error. C23 is the checkbox and B4 is the number.

Was it helpful?

Solution

You'll have to create a linked cell to the checkbox if you have not done so already (in Design Mode right click on the checkbox and see "LinkedCell" in the Properties menu). Then, when your checkbox is checked, this linked cell will return TRUE if checked or FALSE if not checked.

If you have C23 as your linked cell you can use the below formula if you have enabled iterative calculations and they are set to 1 (see File > Excel Options > Formulas > Calculation Options -- check the Enable iterative calculations box and set the maximum value to 1):

***The only catch to this is without VBA you will need a helper cell to establish what B4's initial value should be. This is usually the quickest solution and the helper cell can be the same font color as the background color of its surrounding area in your worksheet if you'd like to hide it somewhere. I have used B3 in my example of the cell address of the helper cell.

Once all of that is complete, place the following in cell B4:

=IF(C23=TRUE,B3+1,B3)

Hope this helps or at least gets you pointed in the right direction.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top