Consulting

Results 1 to 5 of 5

Thread: HELP: CHECKBOX

  1. #1
    VBAX Regular
    Joined
    Mar 2006
    Posts
    18
    Location

    Question HELP: CHECKBOX

    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

    Attachment 2862

  2. #2
    MS Excel MVP VBAX Mentor Andy Pope's Avatar
    Joined
    May 2004
    Location
    Essex, England
    Posts
    344
    Location
    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.
    Cheers
    Andy

  3. #3
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,455
    Location
    Here is a solution

  4. #4
    VBAX Regular
    Joined
    Mar 2006
    Posts
    18
    Location

    thanks, u r the best!!

  5. #5
    MS Excel MVP VBAX Mentor Andy Pope's Avatar
    Joined
    May 2004
    Location
    Essex, England
    Posts
    344
    Location
    Hi xld,

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •