+ Reply to Thread
Results 1 to 8 of 8

Excel combo chart assistance

  1. #1
    Registered User
    Join Date
    06-03-2009
    Location
    N.Ireland
    MS-Off Ver
    Excel 2003
    Posts
    76

    Excel combo chart assistance

    I have created a simple chart in excel and i have added a combobox to update the chart based on the selection from the combobox and this works fine. However the combobox does not group together the group selected from the combobox. My combobox is populated with the following values:

    Car
    Bus
    Lorry
    Motorcycle
    Tractor

    I want the chart to group together all the vehicles ie all the "Cars" from the data, at present it only displays one row of data per chart. Can anyone help, i have included my workbook below:
    Attached Files Attached Files
    Last edited by PRodgers; 08-28-2009 at 10:46 AM.

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436

    Re: Excel combo chart assistance

    Try replacing the INDEX formula, which will only return a single record, with

    C2: =SUMIF($A$6:$A$29,$B$2,B6:B29)
    Cheers
    Andy
    www.andypope.info

  3. #3
    Registered User
    Join Date
    06-03-2009
    Location
    N.Ireland
    MS-Off Ver
    Excel 2003
    Posts
    76

    Re: Excel combo chart assistance

    The chart isnt updating when i select a value from the combobox even before i tried the above formula, i not sure what has happened.
    Last edited by PRodgers; 08-28-2009 at 09:00 AM.

  4. #4
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436

    Re: Excel combo chart assistance

    the file you posted had calculation mode sset to manual.

    Tools > Options > Calculation > Automatic

    should make it update

  5. #5
    Registered User
    Join Date
    06-03-2009
    Location
    N.Ireland
    MS-Off Ver
    Excel 2003
    Posts
    76

    Re: Excel combo chart assistance

    Quote Originally Posted by Andy Pope View Post
    the file you posted had calculation mode sset to manual.

    Tools > Options > Calculation > Automatic

    should make it update
    Thanks Andy, i couldnt work out where i was going wrong

  6. #6
    Registered User
    Join Date
    06-03-2009
    Location
    N.Ireland
    MS-Off Ver
    Excel 2003
    Posts
    76

    Re: Excel combo chart assistance

    Andy im trying to add a second combobox to filter the data, i have added another column called "Fuel", do i use VLOOKUP or could i use the INDIRECT function to filter for ie "Car" and "Petrol"?

    Here is the worksheet im using:
    Attached Files Attached Files

  7. #7
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436

    Re: Excel combo chart assistance

    Now you need to use SUMPRODUCT

    C2: =SUMPRODUCT(($A$6:$A$29=$B2)*($B$6:$B$29=$C2)*(C6:C29))

    Also the new combobox needs to output it's selection to a different cell. Otherwise both combos will change at once.

    And you need to change the INDEX formula

    B2: =INDEX(Vehicle,$A$2)
    C2: =INDEX(Fuel,$A$3)
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    06-03-2009
    Location
    N.Ireland
    MS-Off Ver
    Excel 2003
    Posts
    76

    Re: Excel combo chart assistance

    Quote Originally Posted by Andy Pope View Post
    Now you need to use SUMPRODUCT

    C2: =SUMPRODUCT(($A$6:$A$29=$B2)*($B$6:$B$29=$C2)*(C6:C29))

    Also the new combobox needs to output it's selection to a different cell. Otherwise both combos will change at once.

    And you need to change the INDEX formula

    B2: =INDEX(Vehicle,$A$2)
    C2: =INDEX(Fuel,$A$3)

    Andy thankyou for you help, i really appreciate it, that works well

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1