PDA

View Full Version : HELP: CHECKBOX



evlai
03-01-2006, 08:25 AM
:dunno I am new to the Excel VBA. I need to know how to use checkbox if i click on "EMEA" then range G15 will calculate the total sales of EMEA. if i click on all three checkboxes, range G15 will cacalte the total sales of all region.

I am attaching the file in this post for clearer picture. Thanks

Please help. Thanks
:yes
2862

Andy Pope
03-01-2006, 08:52 AM
Hi,

Do you really need VBA for this?
This formula in G15
=SUMPRODUCT((($A$2:$A$11="EMEA")*($B$2:$B$11)*--B14)+(($A$2:$A$11="AMF")*($B$2:$B$11)*--B16)+(($A$2:$A$11="APJ")*($B$2:$B$11)*--B18))With the checkboxes link to cells B14,B16 and B18 will give you the totals.

Bob Phillips
03-01-2006, 08:57 AM
Here is a solution

evlai
03-01-2006, 08:57 AM
:thumb
thanks, u r the best!!

Andy Pope
03-01-2006, 09:04 AM
Hi xld,

Your code is in another workbook. Book1.xls!CalcTotals