+ Reply to Thread
Results 1 to 5 of 5

Dynamically change how values are displayed in a chart?

Hybrid View

  1. #1
    Registered User
    Join Date
    06-21-2012
    Location
    Netherlands
    MS-Off Ver
    365
    Posts
    48

    Dynamically change how values are displayed in a chart?

    Is it possible to dynamically change how values are displayed in charts?

    I have a list which references different named ranges. It either needs to display the values in a graph as a number (without decimals) or a percentage depending on the source. Is this possible? Maybe with some VBA? Or am I asking too much from excel?

  2. #2
    Registered User
    Join Date
    02-09-2013
    Location
    France
    MS-Off Ver
    Excel 2007
    Posts
    50

    Re: Dynamically change how values are displayed in a chart?

    Doesn't Excel already do this? If your source is formatted correctly, it will be aware of the format required...

  3. #3
    Registered User
    Join Date
    06-21-2012
    Location
    Netherlands
    MS-Off Ver
    365
    Posts
    48

    Re: Dynamically change how values are displayed in a chart?

    Yes it does, but not how I got my sheet set up. The cell values for the chart are filled by an hlookup, which can change depending on the selection of a dropdown menu.

    So my question should be. Can de cell formatting change based on the source of the hlookup?
    The general setting adds decimals and leaves out the thousand separator.

  4. #4
    Valued Forum Contributor
    Join Date
    10-13-2010
    Location
    Sunderland, England
    MS-Off Ver
    Excel 2007 (Home) / 2003 (Work)
    Posts
    740

    Re: Dynamically change how values are displayed in a chart?

    It can be done, with something along the lines of

    Range("graphdata").NumberFormat = "0.00%"
    but it's difficult to give exact code without seeing your workbook.

  5. #5
    Registered User
    Join Date
    06-21-2012
    Location
    Netherlands
    MS-Off Ver
    365
    Posts
    48

    Re: Dynamically change how values are displayed in a chart?

    I can't share the workbook. But i do have an image of the workbook.
    longterm.PNG

    The formula in U8; =IF(HLOOKUP(U$4;INDIRECT("FC_"&STRM);$E8;FALSE)="";#N/A;HLOOKUP(U$4;INDIRECT("FC_"&STRM);$E8;FALSE))
    STRM is a dropdown list in F1, containing different work streams.
    E8 contains =VLOOKUP(C7;LIST_FIELD_INDEX;2;FALSE) which references to an index table. This changes based on the selection made in C7 (drop down menu)

    The graph is based on data in row 8 and 9 which can be a number or a percentage.

    Does that help?

+ 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. Change the range in x axis dynamically for line chart
    By dimwit in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 06-27-2013, 05:23 AM
  2. Input to chart 2 column and displayed this values
    By mafo in forum Excel Charting & Pivots
    Replies: 5
    Last Post: 01-07-2013, 06:03 AM
  3. Replies: 9
    Last Post: 11-21-2011, 05:11 PM
  4. Can I change the way truth values are displayed?
    By xirx in forum Excel General
    Replies: 4
    Last Post: 08-07-2006, 08:55 AM
  5. use mouseclick to dynamically change chart series? Chart_beforeDoubleClick?
    By KR in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-15-2006, 10:25 AM

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