+ Reply to Thread
Results 1 to 4 of 4

Chart that is conditional on a cell value

  1. #1
    Registered User
    Join Date
    08-18-2016
    Location
    Lexington, Virginia, USA
    MS-Off Ver
    2013
    Posts
    13

    Chart that is conditional on a cell value

    I'm interested in incorporating dynamic chart selection into a spreadsheet. I'm picturing a dashboard of sorts in which the user would select a variable (e.g., inflation) and a chart for that variable would appear in a designated spot. Simplistically, you can think about it as cell A1 containing either a 1 or a 2. There are two different charts somewhere else in the spreadsheet. If the user enters a 1 in cell A1, the first of these charts appears anchored in cell B2 . If the user enters a 2 in cell A1, a completely different chart appears anchored in cell B2. The attached spreadseet illustrates this.

    I can make things happen for some situations by using a single chart and then having the data for that chart be conditional on what is entered in cell A1, but it is quite tricky when the different charts do not have similar formats. For example, I don't see a way to make it work when one chart is a pie chart and another is a line chart. I'd appreciate any advice you might have.
    Attached Files Attached Files
    Last edited by ChefHoovisan; 07-27-2021 at 03:29 PM.

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

    Re: Chart that is conditional on a cell value

    You can use a linked picture to display a range of cells, over which a chart sits.

    There are 2 named ranges, which cover the charts.
    Another named formula to determine which named range to use.

    I added a picture and used the formula bar to link it to the named range.
    Attached Files Attached Files
    Cheers
    Andy
    www.andypope.info

  3. #3
    Registered User
    Join Date
    08-18-2016
    Location
    Lexington, Virginia, USA
    MS-Off Ver
    2013
    Posts
    13

    Re: Chart that is conditional on a cell value

    That works great Andy, but I'm struggling to understand how to set up the conditional link to the charts. After clicking on the chart you ha ve in B2, the formula bar shows "=VIEW_CHART" but I'm not understanding how that gets directed to the VIEW_CHART_1 or VIEW_CHART_2 charts depending on what number is in cell 1. I apologize for my ignorance here. I know I'm missing something easy, but can't seem to put my finger on it.

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

    Re: Chart that is conditional on a cell value

    use the Name Manager to see the 3 named items.
    2 are ranges then other is a formula using the CHOOSE function

+ 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. HELP ME on Pie Chart Colours Based on Cell Colour Conditional Formatting
    By gelotangson in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-14-2019, 12:12 PM
  2. Replies: 1
    Last Post: 09-09-2017, 01:56 PM
  3. Using conditional forming of a cell to change the color of a chart.
    By sungen99 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-06-2017, 02:20 PM
  4. Colour Doughnut chart segment based on cell conditional format
    By ldarley1978 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-25-2016, 06:44 AM
  5. [SOLVED] Conditional Formatting for Chart Series Based on Cell Colour
    By benjthom in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-20-2013, 05:32 AM
  6. How to copy cell format done by Conditional Formatting to Chart?
    By Excel4Everything in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-31-2013, 08:21 AM
  7. Creating chart, conditional on cell clicked
    By Pasha81 in forum Excel Charting & Pivots
    Replies: 17
    Last Post: 06-15-2009, 06:25 PM

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