+ Reply to Thread
Results 1 to 3 of 3

IF Statement for selecting chart data source

  1. #1
    Registered User
    Join Date
    12-06-2021
    Location
    Scotland
    MS-Off Ver
    365 (Mac)
    Posts
    9

    IF Statement for selecting chart data source

    Hi,

    I have got a chart with several series on it. One of the series I would only like to be shown when cell B2 reads "On".
    I have set up a data validation in B2 already (On/Off).

    I was wondering if there was a way to get this series to plot/not plot depending on the value in cell B2.
    I have tried along the lines of: =if(B2="On",H4:H40,0) in the 'X value' box when selecting chart data but this doesn't work.

    Any suggestions greatly appreciated!
    Thanks.

  2. #2
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,256

    Re: IF Statement for selecting chart data source

    You'll need to put that into a defined name, then use the name in the chart dialog.
    Remember what the dormouse said
    Feed your head

  3. #3
    Registered User
    Join Date
    12-06-2021
    Location
    Scotland
    MS-Off Ver
    365 (Mac)
    Posts
    9

    Re: IF Statement for selecting chart data source

    Got it working now, thanks!

+ 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. Excel chart with multi level category label issue delinking source data from chart
    By babu324 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-19-2017, 02:58 AM
  2. Replies: 3
    Last Post: 05-05-2015, 12:43 PM
  3. Selecting source data for multiple pivot tables
    By south12 in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 05-05-2014, 10:53 AM
  4. Chart not updated until chart sheet opened following source data update
    By untilyesterday in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 09-24-2013, 12:27 PM
  5. Vlookup not selecting source data
    By Me & I in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-14-2013, 04:34 AM
  6. Vlookup not selecting source data
    By tryer in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 02-15-2010, 01:30 PM
  7. How do you have one source data in a chart flow into a 2nd source of data?
    By Disintegrate in forum Excel Charting & Pivots
    Replies: 4
    Last Post: 10-06-2009, 09:26 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