+ Reply to Thread
Results 1 to 5 of 5

Change Data Labels formatting using Macros

  1. #1
    Registered User
    Join Date
    09-29-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    91

    Change Data Labels formatting using Macros

    I have around 20 2D bar charts and I link each of the chart to a pivot table using a macro. However, I need to display the 'Data Label' for each of the bar in the bar graph. And specifically, format the data label to a specific requirement.

    Typically, I am trying to record a macro to

    1. Add Data Labels to a chart.
    2. Assign size 11 to Data labels and aligh them at a "-45" degree angle to the axis.
    3. And provide data label type as number.

    I am attaching a sample spreadsheet with a chart with all the requirements satisfied.

    Would greatly appreciate any help on how to get here.

    Thanks.
    Attached Files Attached Files

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

    Re: Change Data Labels formatting using Macros

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

  3. #3
    Registered User
    Join Date
    09-29-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    91

    Re: Change Data Labels formatting using Macros

    That works awesome. Is it possible that we can format the type of text?. Like presently, it is general, I would like to change it to currency with 2 decimal places or Number with 2 decimal places. is this possible?

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

    Re: Change Data Labels formatting using Macros

    Use the object browser and help files to discover more about the object model for data labels.

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    09-29-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    91

    Re: Change Data Labels formatting using Macros

    Worked like a charm. Thanks a bunch.

+ 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