AllExperts > Excel 
Search      
Excel
Volunteer
Answers to thousands of questions
 Home · More Excel Questions · Answer Library  · Encyclopedia ·
More Excel Answers
Question Library

Ask a question about Excel
Volunteer
Experts of the Month
Expert Login

Awards

About Us
Tell friends
Link to Us
Disclaimer

 
 
 
 
About Stuart Resnick
Expertise
I can answer any question relating to MS Excel formulas, or to programming with vba (Visual Basic for Applications) in the Excel environment

Experience
As a consultant, I've designed Excel tools since the 90s, working for the Federal Reserve Bank, AT&T, and (currently) Gap Inc.

 
   

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


 
About Excel
This topic answers questions related to Microsoft Excel spreadsheet (or workbook) stand-alone or Mircrosoft Office Excel including Excel 2003, Excel 2007, Office 2000, and Office XP. You can get Excel help on Excel formulas(or functions), Excell macros, charting in Excel, advanced features, and the general use of Excel. This does not provide a general Excel tutorial nor the basics of using a spreadsheet. It provides specific answers to using Microsoft Excel only. If you do not see your Excel question answered in this area then please ask an Excel question here
User Agreement | Privacy Policy | Kids' Privacy Policy | Help
Copyright  © 2008 About, Inc. AllExperts, AllExperts.com, and About.com are registered trademarks of About, Inc. All rights reserved.