| |
You are here: Experts > Computing/Technology > Microsoft Software > Excel > Linking A Checkbox
Excel - Linking A Checkbox
Expert: Stuart Resnick - 11/3/2009
Question check boxes are in column A and costs are in column D. My sum formula is =SUM(D1:D10) but I do not want the value in D1 added in the formula if the checkbox is not selected. How can I achieve this? Thank you.
Answer Start with new worksheet. View the Control Toolbox toolbar, and use it to place a checkbox on the sheet. Right-click on the checkbox, and set the LinkedCell Property to =A1. Exit design mode, and close the Control Toolbox. Check and uncheck the new checkbox, and see how cell A1 switches between TRUE and FALSE depending on whether checkbox is checked.
In an unused cell, enter this formula:
=IF(A1,SUM(D1:D10),SUM(D2:D10))
The result displayed by this formula will include D1 in the sum only if the checkbox is checked.
Add to this Answer Ask a Question
|
|