+ Reply to Thread
Results 1 to 14 of 14

Pivotchart's Pie Title

  1. #1
    Forum Contributor
    Join Date
    07-25-2008
    Location
    texas
    Posts
    178

    Pivotchart's Pie Title

    I can save a macro that builds the Pie chart from the column. It does everything but let me assign a title to the pie chart. I have to do that manually . Is there a way to assign a title thru a macro?
    This is obviously a charting and a macro question but I took a chance and put it under the charting forum.
    Last edited by jartzh; 02-20-2009 at 12:45 PM.

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

    Re: Pivotchart's Pie Title

    something like this
    Please Login or Register  to view this content.
    Cheers
    Andy
    www.andypope.info

  3. #3
    Forum Contributor
    Join Date
    07-25-2008
    Location
    texas
    Posts
    178

    Re: Pivotchart's Pie Title

    Brilliant!
    Is there a way to put the values of cell A1 in the title?

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

    Re: Pivotchart's Pie Title

    Please Login or Register  to view this content.
    Or you can link the chart title to the cell.
    http://www.andypope.info/tips/tip001.htm

  5. #5
    Forum Contributor
    Join Date
    07-25-2008
    Location
    texas
    Posts
    178

    Re: Pivotchart's Pie Title

    Andy,
    Can I use activesheet to specify the cell?

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

    Re: Pivotchart's Pie Title

    Only if the activechart is an object within a worksheet.
    Otherwise the activesheet will be the chart sheet and chart sheets do not have cells.

  7. #7
    Forum Contributor
    Join Date
    07-25-2008
    Location
    texas
    Posts
    178

    Re: Pivotchart's Pie Title

    Andy,
    I have the data for the chart in col A and I would like cell B1 to be the title. But I want it to work on any of the 12 worksheets in the workbook.
    So I need to say "just grab the value in B1 on the active worksheet".

    Is that possible?

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

    Re: Pivotchart's Pie Title

    As I said if the Activechart is on the same sheet as the cell B1 then yes.

    Please Login or Register  to view this content.
    If your chart is on it's own chart sheet then no as the activesheet will then be the chart and not any of those with a B1 cell

  9. #9
    Forum Contributor
    Join Date
    07-25-2008
    Location
    texas
    Posts
    178

    Re: Pivotchart's Pie Title

    Andy,
    Thats why I am having this problem. I have 12 worksheets and want to build a single macro that will build a chart on whatever worksheet I am on at that time. That part works fine but I can't title it.


    Just fishing here but :
    What about if I had a seperate worksheet that would get the title from it based on the name of the active worksheet?

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

    Re: Pivotchart's Pie Title

    can you post what you have so far?

  11. #11
    Forum Contributor
    Join Date
    07-25-2008
    Location
    texas
    Posts
    178

    Re: Pivotchart's Pie Title

    Andy,
    Sure here it is. It only works up thru the job experience worksheet now.
    If you go to the classificationdata worksheet and use the removechart macro to clean off the worksheet, then use the buildchart macro to build the chart from the contents of col A.

    I think since it uses a template so you wont be able to build the chart .
    Attached Files Attached Files

  12. #12
    Forum Contributor
    Join Date
    07-25-2008
    Location
    texas
    Posts
    178

    Re: Pivotchart's Pie Title

    Andy,
    I bet you just wanted the code. Here it is.

    [
    Please Login or Register  to view this content.
    Last edited by jartzh; 02-20-2009 at 12:28 PM.

  13. #13
    Forum Contributor
    Join Date
    07-25-2008
    Location
    texas
    Posts
    178

    Re: Pivotchart's Pie Title

    The active sheet worked fine. I load the title up in E1.

    Andy you are the man.
    Thanks.

    Please Login or Register  to view this content.

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

    Re: Pivotchart's Pie Title

    Something like this,

    Please Login or Register  to view this content.
    Although the pivot table source and names may not be suitable for every chart/sheet

+ 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