+ Reply to Thread
Results 1 to 5 of 5

I need my chart trendline data label to automatically express in scientific to 6 decimal

  1. #1
    Registered User
    Join Date
    03-06-2015
    Location
    Perth, Australia
    MS-Off Ver
    Excel 2007
    Posts
    2

    I need my chart trendline data label to automatically express in scientific to 6 decimal

    I run a program that refreshes a chart data each time it is run and produces a trendline. This trendline is a 3rd order polynomial. A data label is shown that is automatically formatted in scientific notation to 2 decimal places. This information is not accurate for my purposes as I need the data to at least 6 decimal places. How do I set the default to 6 decimals. I have tried to record a macro to capture a manual change but this does not do the trick. Any thoughts?

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: I need my chart trendline data label to automatically express in scientific to 6 decim

    This is what I got when I recorded a manual change....

    Please Login or Register  to view this content.
    Change the chart, seriescollection, and trendline references to suit.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: I need my chart trendline data label to automatically express in scientific to 6 decim

    You would be better off using LINEST to get the values on the worksheet. Select a range 7 cells wide, and array-enter

    =LINEST(yValues, xValues^{1,2,3,4,5,6})

    The order of appearance of coefficients is x6, x5, ..., x, b
    Entia non sunt multiplicanda sine necessitate

  4. #4
    Registered User
    Join Date
    03-06-2015
    Location
    Perth, Australia
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: I need my chart trendline data label to automatically express in scientific to 6 decim

    Thank you AlphaFrog! Works perfectly. Interested to know how you were able to record a manual change but I couldn't?

  5. #5
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: I need my chart trendline data label to automatically express in scientific to 6 decim

    Quote Originally Posted by Bluedog1212 View Post
    Thank you AlphaFrog! Works perfectly. Interested to know how you were able to record a manual change but I couldn't?
    You're welcome. I really don't know why it recorded for just me.

    Also checkout shg's clever solution.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 5
    Last Post: 09-12-2014, 04:10 PM
  2. [SOLVED] Chart - Data Label shows in decimal format vs whole number
    By SVTF in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 10-28-2013, 06:08 AM
  3. Express time as a decimal and add
    By seanbrockest in forum Excel General
    Replies: 6
    Last Post: 06-09-2009, 03:37 AM
  4. Replies: 1
    Last Post: 01-22-2008, 08:20 PM
  5. XY Chart Improvements For Scientific Data
    By Phil Preen in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 10-15-2005, 12:05 AM

Tags for this Thread

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