Results 1 to 10 of 10
  1. #1
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    Cincinnati, Ohio, USA
    Posts
    7,089
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Creating a clock using pie charts (Any)

    I've looked for something akin to this in the forums and abroad but thus far a solution has evaded me.

    What I am trying to accomplish is a means of entering data into Excel and generating a clock as a result. The purpose is to provide a visual represenation of programming elements for radio. For example:

    <pre>TIME LENGTH ELEMENT
    ----- ------ -----------
    13:15 00:05 STOP SET
    13:20 00:10 music</pre>


    I have attached a sample Excel chart that further illustrates this concept. I suppose my question is two-fold, really: is it possible to write a macro that will digest information entered into this format and return a nicely formatted pie chart, and can this solution be portable and lightweight enough so that others can use it?

    Pardon my ignorance, please! I know enough to be dangerous but not enough to automate the process. Ideas?
    -Mark

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Creating a clock using pie charts (Any)

    Does the attached do what you want? There is a button on the sheet to create a chart.

    Note: macro security should not be set to high, otherwise macros will be disabled.

  3. #3
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts

    Re: Creating a clock using pie charts (Any)

    Just as another option, something like the attached will work as a template as long as you have an hour's material each time - you just need to update the B and C columns each time.
    Regards,
    Rory

    Microsoft MVP - Excel

  4. #4
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: Creating a clock using pie charts (Any)

    I get an error with this line (after removing your error handling):

    <pre>.SeriesCollection(1).ApplyDataLabels AutoText:=True, _
    HasLeaderLines:=True, ShowCategoryName:=True, _
    ShowValue:=True</pre>


    I assume it is because the "ApplyDataLabels" method in XL97 is different. I am guessing that the equivalent in XL97 is something like this:
    <pre>.SeriesCollection(1).ApplyDataLabels _
    Type:= xlDataLabelsShowLabelAndPercent, _
    AutoText:=True, LegendKey:=True, _
    HasLeaderLines:=True</pre>


    Steve

  5. #5
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Creating a clock using pie charts (Any)

    Yes, probably a difference between Excel 97 VBA and later versions.

  6. #6
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    Cincinnati, Ohio, USA
    Posts
    7,089
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Creating a clock using pie charts (Any)

    Hans (and Rory),

    Thank you so much for your quick replies! This is very close to what I am trying to accomplish. I can take this and format it in a way that the intended audience can understand without too many questions, which I can easily accomplish by manipulating the data labels. When I say that it has to be written for the lowest common denominator, I truly mean this will land on the desk of people who aren't sure where their mouse and keyboard are from moment to moment. <img src=/S/anigrin.gif border=0 alt=anigrin width=19 height=19>

    Thanks again, crew. Now if you'll excuse me, I have a macro to break. <img src=/S/laugh.gif border=0 alt=laugh width=15 height=15>
    -Mark

  7. #7
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    Cincinnati, Ohio, USA
    Posts
    7,089
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Creating a clock using pie charts (Any)

    I'm looking at the macro code and trying to figure out how I can combine it with Steve's formatting. Ultimately I would like to set up a template where the data could be entered into the sheet, the button clicked, and a new chart for that series added to the workbook.

    This entails a few more variables, to be certain. Where is a good resource for Excel macro code?
    -Mark

  8. #8
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: Creating a clock using pie charts (Any)

    <post#=320321>post 320321</post#> has some good references about macro coding. There are also plenty of books a good source of some excellent books are Excel Books by John Walkenbach. I have used his "power programming for XL2000" and that seres is recommended.

    If you ask specific questions, we might be able to help your here...

    <img src=/S/whisper.gif border=0 alt=whisper width=29 height=17>Are you sure that you didn't mean "rory's formatting", I am not sure what formatting I did that you want (or do you mean a different Steve?).

    Steve

  9. #9
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    Cincinnati, Ohio, USA
    Posts
    7,089
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Creating a clock using pie charts (Any)

    Thanks, Steve. Or maybe I should thank Rory, since I already thanked you (albeit incorrectly) in my last post. Hey, it's 4:30 in the morning over in these parts and my brain ain't workin' all that well... <img src=/S/nosleep.gif border=0 alt=nosleep width=27 height=15>

    I may be back with specifics later if I can't figure it out on my own. I'm at least going to have a crack at this on my own before I give up...!
    -Mark

  10. #10
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: Creating a clock using pie charts (Any)

    I find that my brain doesn't work all the well, many times during the day...

    Steve

Posting Permissions

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