+ Reply to Thread
Results 1 to 13 of 13

Simple chart!!! This is killing me!

  1. #1
    Registered User
    Join Date
    04-03-2008
    Posts
    15

    Simple chart!!! This is killing me!

    Hi, I have the simplest question, but I just can't do it!!!!
    Excel sheet:
    Name (column heading)
    James
    Greg
    Greg
    (etc.)

    Thats it! Now, I just want a graph (pie, or whatever) broken up by name!
    So the example above would have a pie chart with 2/3 Greg and 1/3 James!!

    (My excel sheet has more, but you get the idea)...

    Why can't I do this?!?!

  2. #2
    Valued Forum Contributor rwgrietveld's Avatar
    Join Date
    09-02-2008
    Location
    Netherlands
    MS-Off Ver
    XL 2007 / XL 2010
    Posts
    1,671

    re: Simple chart!!! This is killing me!

    Name Total
    James 1
    Greg 2

    Charting options, data Labels : Percentage
    Looking for great solutions but hate waiting?
    Seach this Forum through Google

    www.Google.com
    (e.g. +multiple +IF site:excelforum.com/excel-general/ )

    www.Google.com
    (e.g. +fill +combobox site:excelforum.com/excel-programming/ )

    Ave,
    Ricardo

  3. #3
    Registered User
    Join Date
    04-03-2008
    Posts
    15

    Thanks!

    I preferably want to do this on the fly, and not create another sheet with totals.

    The reason for this is that this document will be used on an ongoing basis, with new names being added, as well as additions of existing names. So it would be a hassle to add a new name to the totals sheet and then reprogram the chart each time this occurs...

    So, without a totals column/sheet, can we do this on the fly?

    For each...
    Count unique...

    ??

    Thanks!

  4. #4
    Valued Forum Contributor rwgrietveld's Avatar
    Join Date
    09-02-2008
    Location
    Netherlands
    MS-Off Ver
    XL 2007 / XL 2010
    Posts
    1,671

    re: Simple chart!!! This is killing me!

    Name
    Greg
    Greg
    Juke
    Juke
    Ron
    Ron
    Ron

    Select the Column, Data, Subtotals. Each change in Name, Use function Count. Result:
    Name
    Greg Count 2
    Juke Count 2
    Ron Count 3

    Select and do what I have described before

  5. #5
    Registered User
    Join Date
    04-03-2008
    Posts
    15

    Thanks!

    This looks again like another total-ing option.

    Surely there must be a way I can define the data set to include a function which does this?

  6. #6
    Valued Forum Contributor rwgrietveld's Avatar
    Join Date
    09-02-2008
    Location
    Netherlands
    MS-Off Ver
    XL 2007 / XL 2010
    Posts
    1,671
    brad, I see why this is killing you. Maybe blink twice and the chart will appear by itself
    - A small macro could do the trick. A single button in the worksheet to press.
    All possible, but ...

  7. #7
    Valued Forum Contributor rwgrietveld's Avatar
    Join Date
    09-02-2008
    Location
    Netherlands
    MS-Off Ver
    XL 2007 / XL 2010
    Posts
    1,671

    re: Simple chart!!! This is killing me!

    Here some code for you. can you do the rest yourself? If not I will help you further...
    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    04-03-2008
    Posts
    15
    Thanks, im not sure how to implement that... but on the same token im not keen to implement a macro at all... Also, as your solution counts all of the cells up to 65K, it will be slow with multiple instances of that macro...

    Also, im looking at implementing the solution on a much bigger scale, more than just 1 column - the idea of my question is just to find out how excel can count instances of a string and then compile those into a graph!

    Surely, surely we're missing a very simple solution to this! The problem is not difficult!!!!

    Thanks!!!!

  9. #9
    Valued Forum Contributor rwgrietveld's Avatar
    Join Date
    09-02-2008
    Location
    Netherlands
    MS-Off Ver
    XL 2007 / XL 2010
    Posts
    1,671

    re:Simple chart!!! This is killing me!

    Also, as your solution counts all of the cells up to 65K, it will be slow with multiple instances of that macro...
    Is not quit true, but anyway...
    The only thing I can think of when implementing:
    a solution on a much bigger scale, more than just 1 column
    You should consider Pivot Tables. This has the Count function in it. In case of this example drag Name in the "Row fields" and in the "Data Items"

    If this did not gave you the solution, I hope someone smarter than me will give it a go.
    Last edited by rwgrietveld; 09-13-2008 at 04:56 AM. Reason: small correction

  10. #10
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436
    As rwgrietveld points out the only auto solution is pivot table/graph.

    Graphs do not summarize your data they only present it and it has to be numeric.

    You need to calculate the totals before charting. You can use formula, subtotals or code but the crucial thing is you need to do it as the chart will not.
    Cheers
    Andy
    www.andypope.info

  11. #11
    Registered User
    Join Date
    04-03-2008
    Posts
    15

    Genius!!

    The pivot chart did it!!! I've never really gotten into pivot chart, but your description of how to utilise it sis the trick!!

    My only question is how to refresh the pivot chart's data... I know you can right click 'refresh'.... but is there a way i can make a button to put on the sheet which can refresh the data?

    Thanks for your help!

  12. #12
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678
    brad.tho,

    Please be sure to read the Forum Rules about thread titles before starting your next thread.

  13. #13
    Valued Forum Contributor rwgrietveld's Avatar
    Join Date
    09-02-2008
    Location
    Netherlands
    MS-Off Ver
    XL 2007 / XL 2010
    Posts
    1,671
    This is unusual exept when it is part of total macro as this button already exists (the exclamation mark

    Anyway:
    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Trying to make a chart
    By DarkSoul in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 07-17-2008, 03:57 PM
  2. Simple but frustrating problem with chart
    By geigerc0unter in forum Excel General
    Replies: 3
    Last Post: 06-02-2007, 04:27 PM
  3. simple chart
    By bgn2 in forum Excel General
    Replies: 3
    Last Post: 04-08-2007, 03:20 PM
  4. Going insane!
    By kik in forum Excel - New Users/Basics
    Replies: 10
    Last Post: 01-31-2007, 08:21 AM
  5. Simple Count Chart
    By Push Latency in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 01-25-2007, 01:24 PM

Tags for this Thread

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