+ Reply to Thread
Results 1 to 3 of 3

Having trouble forcing Excel to plot data values instead of index values

  1. #1
    Registered User
    Join Date
    10-17-2016
    Location
    Virginia
    MS-Off Ver
    365
    Posts
    4

    Having trouble forcing Excel to plot data values instead of index values

    I have two columns of data, X and Y. Let's say they are both of length 100. Y contains 100 integer values, but X varies. Depending on certain conditions, only a portion of the X data is valid. When X is not valid, I am using IF statements to populate the cell as a blank entry (=""). X could be 10 numbers and 90 blank cells, or 100 numbers and 0 blank cells. My chart is plotting Y vs X and I have selected all 100 values. I would like my chart to plot only the series pairs with valid data.

    The blank cells are an issue. If X contains 100 integers, all is well. The data plots as expected. However, if X contains even 1 blank cell, Excel resorts to plotting Y vs the index of X and not the value of X. I want to continue plotting against the value of X even with blank cells.

    To illustrate my problem I've isolated it to an easily understandable comparison. Here's what happens when X contains all integers. However, when a single value is blank, note what happens to the X axis. Is there a way to prevent Excel from saying "Oh, a non-integer? I'm going to plot index values then". I want to keep plotting values, but for Excel to simply gloss over the pairs with a blank member.

    I re-submitted this twice due to typos in the subject line. Unsure how to delete the original copies... Sorry for the spam. I assumed I would be able to.

  2. #2
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,811

    Re: Having trouble forcing Excel to plot data values instead of index values

    This is a common problem whenever we try to simulate blank cells, since Excel does not contain a function that truly means "blank". Note that the return value of "" is a text string. Whenever an XY scatter chart encounters a text string in the X values range, it ignores the numeric values and plots index numbers. The key to solving this is to make your IF() function return the N/A error (using the NA() function) instead of a text string.

    This essay is an fairly thorough discussion around how Excel chart's "blank" cells and how to work with formulas to avoid these kinds of problems: http://peltiertech.com/mind-the-gap-...g-empty-cells/
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  3. #3
    Registered User
    Join Date
    10-17-2016
    Location
    Virginia
    MS-Off Ver
    365
    Posts
    4

    Re: Having trouble forcing Excel to plot data values instead of index values

    You are the wind beneath my wings.

+ 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. [SOLVED] Having trouble forcing Excel to data values instead of index values plot
    By Matt_M in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 10-17-2016, 01:15 PM
  2. [SOLVED] Having trouble forcing Excel to data values instead of index values
    By Matt_M in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 10-17-2016, 01:14 PM
  3. [SOLVED] INDEX, MATCH & LARGE trouble with duplicate values
    By paulstuartbullock in forum Excel General
    Replies: 4
    Last Post: 08-04-2015, 11:17 PM
  4. [SOLVED] Values not returned by Index, Match when using values from Data Validation
    By Avinashch in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-10-2015, 10:34 AM
  5. Replies: 2
    Last Post: 07-26-2012, 09:27 AM
  6. Replies: 6
    Last Post: 05-17-2012, 12:07 PM
  7. Forcing a chart to plot only relevant data entries
    By Sam Gregoir in forum Excel Charting & Pivots
    Replies: 7
    Last Post: 07-07-2008, 07:02 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