Search code examples
checkboxformulaexcel-2016

Excel 2016: if checkbox is true, copy value from one cell to another cell, if false, do nothing


Excel 2016: I want to use a checkbox to copy the value from one cell to another cell.

Example: I am using three cells: F36, G36, and H36. The checkbox is in F36. When checked (TRUE), I want the value in G36 ($350.00) to be copied to H36. When unchecked (FALSE), do nothing.

I am already using conditional formatting for G36 and H36 to change text color depending on values. I have tried using a formula to do this but to no avail. I have also searched YouTube and other forums for suggestions but still no luck.


Solution

  • Assuming you're using Excel's Form Controls to add a checkbox, you can use an IF function in cell H36 to do this:

    =IF(F36,G36,"")

    This formula states that if F36 is true (the checkbox is checked), H36 should copy the value of cell G36. Otherwise, it shouldn't update.

    Checkbox is unchecked:

    Excel screenshot of a checkbox in cell F36, the value "$350.00" in cell G36, and a blank cell, H36.

    Checkbox is checked:

    The same Excel screenshot as above, but  the value "$350.00" is now in cell H36 instead of a blank cell.