Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel - Checkboxes and totals

Status
Not open for further replies.

sarahjane79

Technical User
Nov 6, 2006
5
US
I have a list of expenses that I need to total based on whether or not a checkbox is chosen. How can I do this?

Thanks in advance!
Sarah
 



Hi,

Could you be a tad more specific?

If [the checkbox is checked] then [do the sum] else [zero]?

Skip,

[glasses] [red][/red]
[tongue]
 
Basically it looks like this:

Inititive | Description | Budget | Approved

Approved would be the check box.

If I check approved I want the the budget amount added to my total line. If it is not checked I want it to show in the list but not in the total.
 
Assuming by checkbox you mean something like the one that is on the forms toolbar, that is linked to a cell by right clicking on the checkbox and choosing 'Format Control' and then putting a cell address into the cell link box, then you can simply use something like the following:-

Assume 4 boxes as per your data Inititive | Description | Budget | Approved and that they are linked to cells A1:D1 and that your value are in A2:D2, then you can simply use

=A1*A2+B1*B2+C1*C2+D1*D2

or simply

=SUMPRODUCT(--A1:D1,A2:D2)

Regards
Ken............

----------------------------------------------------------------------------
[peace]It's easier to beg forgiveness than ask permission[2thumbsup]
----------------------------------------------------------------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top