• Creating a clock using pie charts (Any)

    Home » Forums » AskWoody support » Productivity software by function » MS Excel and spreadsheet help » Creating a clock using pie charts (Any)

    • This topic has 9 replies, 4 voices, and was last updated 20 years ago.
    Author
    Topic
    #420018

    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:

    TIME  LENGTH ELEMENT
    ----- ------ -----------
    13:15 00:05  STOP SET
    13:20 00:10  music

    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?

    Viewing 1 reply thread
    Author
    Replies
    • #949952

      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.

      • #949964

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

        .SeriesCollection(1).ApplyDataLabels AutoText:=True, _
              HasLeaderLines:=True, ShowCategoryName:=True, _
              ShowValue:=True

        I assume it is because the “ApplyDataLabels” method in XL97 is different. I am guessing that the equivalent in XL97 is something like this:

        .SeriesCollection(1).ApplyDataLabels  _
              Type:= xlDataLabelsShowLabelAndPercent,  _
              AutoText:=True, LegendKey:=True, _
              HasLeaderLines:=True

        Steve

        • #949969

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

      • #949991

        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. anigrin

        Thanks again, crew. Now if you’ll excuse me, I have a macro to break. laugh

      • #951019

        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?

        • #951020

          post 320321 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…

          whisperAre 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

          • #951024

            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… nosleep

            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…!

            • #951039

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

              Steve

    • #949963

      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.

    Viewing 1 reply thread
    Reply To: Creating a clock using pie charts (Any)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: