+ Reply to Thread
Results 1 to 4 of 4

Format a data label on a chart

  1. #1
    Forum Contributor
    Join Date
    06-11-2009
    Location
    Cape Town
    MS-Off Ver
    Microsoft 365
    Posts
    854

    Format a data label on a chart

    Data is displayed on a chart based on the selection of an option button (Quantity or cost). If I select cost, I would like the data label to be formatted as currency but as a comma format if quantity is selected? I have attached a sample file.
    Thanks in advance.
    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,436

    Re: Format a data label on a chart

    As you have only 1 data label it's probably easiest to link the data label to a cell.

    In a separate cell use this formula to create data label content.
    =IF(Trigger=1,TEXT(F6,"#,##0"),TEXT(F6,"R #,##0"))

    Select data label, select data label again, in formaul bar enter = and click cell containing formula.
    Cheers
    Andy
    www.andypope.info

  3. #3
    Forum Contributor
    Join Date
    06-11-2009
    Location
    Cape Town
    MS-Off Ver
    Microsoft 365
    Posts
    854

    Re: Format a data label on a chart

    Thank Andy. I actually have two data labels (Actual & Budget) so I set up a similar formula for budget and it works perfectly. Is there another way when there are two data labels?
    Thanks in advance.

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

    Re: Format a data label on a chart

    The other way is to use dynamic named range for the data series source. Then the data label will automatically use at number format of the underlying data.
    This would mean referencing the source data, which needs to be number formatted appropriately, rather than the chart table you have currently.

+ 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