+ Reply to Thread
Results 1 to 4 of 4

Thread: Includeing Data as Part of a Legend

  1. #1
    Registered User
    Join Date
    08-22-2011
    Location
    Oregon
    MS-Off Ver
    Excel 2003
    Posts
    8

    Includeing Data as Part of a Legend

    I have a line graph, and one of the lines is a straight line that represents the average. In the Legend I want to include the amount of that average as part of the line's description. For example, in the legend I want it to say "Average 75%" and then the next week if the percentage changes to 77% I want the legend to say "Average 77%". How do I get data that is constantly changing to be part of a legend name?

    I could put the percentage amount on the line in the graph, but it often overlaps with other data if I do that.

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    2003 & 2007 & 2010
    Posts
    11,349

    Re: Includeing Data as Part of a Legend

    Does the legend currently get its text from a cell? If so use a formula in that cell to build the text and average value, something like this.

    ="My Line Series Average is " & TEXT(AVERAGE(B2:B10),"0")

    If the legend text is static use the Source Data dialog to link series name to a cell.
    Cheers
    Andy
    www.andypope.info

  3. #3
    Registered User
    Join Date
    08-22-2011
    Location
    Oregon
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Includeing Data as Part of a Legend

    Quote Originally Posted by Andy Pope View Post
    Does the legend currently get its text from a cell? If so use a formula in that cell to build the text and average value, something like this.

    ="My Line Series Average is " & TEXT(AVERAGE(B2:B10),"0")

    If the legend text is static use the Source Data dialog to link series name to a cell.
    The text can come from a cell, but the percentage is always changing. I tried the following formula:

    ="Average " & TEXT(AVERAGE(I41),"0")

    where the vaule in cell i41 is 74.5%, but the result is "Average 1" It's rounding the percentage into a whole number. If it wasn't for that, this would give me what I need.

  4. #4
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    2003 & 2007 & 2010
    Posts
    11,349

    Re: Includeing Data as Part of a Legend

    Just alter the number format.

    ="Average " & TEXT(AVERAGE(I41),"0.0%")
    Cheers
    Andy
    www.andypope.info

+ 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.2.0