+ Reply to Thread
Results 1 to 6 of 6

Plotting Data against times - Dealing with missing values

  1. #1
    Registered User
    Join Date
    10-17-2008
    Location
    UK
    Posts
    17

    Plotting Data against times - Dealing with missing values

    Hi,

    I have read through every post that the searches i thought might get me relevant information and not found a solution. appologies if this is one of those issues that people bring up every few days. i have had no luck finding a solution as yet.

    I am trying to plot temperature data for a year on a chart. there should be one value for each day however some days are missing data. What i want to acheive is a break in the line when no data exists and not interpolation or zero values. i also need for the x axis to keep every value ie i dont want it to miss a day because it has no data.

    I can get this to work perfectly if i manually delete the formula in cells that return no data. However if i make the value of the cell "" or N/A or NULL() or any other thing i think is sensible i can only get the chart to either put in zero's or draw a line between the last value and the next value.

    i have played with many different iterations of settings under the chart options on how to deal with blank cells.

    i have considered using seperate series for each 'block' of data, however i need this to be automatic and cant see a way to do this.

    My backup option is to run some vbs on the column to copy all non zero values to a seperate column and therefore ensure true blank cells. this seems a bit of a cheat, however.

    I hope this makes sense. i will attach an example if it would help. i imagine this will be a simple 'this is why you are being an idiot' type of answer though!

    Cheers
    Stephen

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,434
    When a cell contains something it is interpreted by the chart.
    Is the contents is non numerical it is treated as text and plotted as zero. The exception to this is the use of NA().
    With NA() line charts will surpress data markers BUT the line will be interpolated between valid points. The setting on Tools > Options > Charts > Plot empty cells, has no effect as the cells are not empty thery contain formula.

    Depending on your data this approach may work
    http://www.andypope.info/charts/brokenlines.htm

    If not your only recourse is to empty the cells, either manually or with code.
    Cheers
    Andy
    www.andypope.info

  3. #3
    Registered User
    Join Date
    10-17-2008
    Location
    UK
    Posts
    17
    Thanks andy,

    unfortunately the data is a bit to complex to use the mask, and it has other graphs behind it. I think i will have to just go with the copy and past method.

    thank you very much for your help - i wish i had asked sooner!

    cheers
    Stephen

  4. #4
    Registered User
    Join Date
    10-17-2008
    Location
    UK
    Posts
    17
    Hope its ok to 'highjack' my own thread.

    i thought it would be simple to 'copy and paste' the values to a new column and delete the blank ones in VB. however using .delete on a cell that is empty does not result in the formula isblank() returning true. if i highlight the cell and manually press delete it evaluated correctly.

    any advice on how to make a cell blank in vba?

    many thanks
    Stephen

  5. #5
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,434
    This will clear all cells with formula returning errors.

    Please Login or Register  to view this content.
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    10-17-2008
    Location
    UK
    Posts
    17
    Clear! thanks so much andy.

    not having a smart day.

    Thanks Again
    Stephen

+ 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. Sequential Data - not plotting values
    By engineer1984 in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 10-14-2008, 11:26 AM
  2. unwanted values from linking data
    By jcavigli in forum Excel General
    Replies: 3
    Last Post: 05-04-2008, 03:39 PM
  3. Replies: 2
    Last Post: 02-14-2008, 05:02 PM
  4. dealing with triplicate data in a worksheet
    By cwp in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-08-2007, 07:15 PM
  5. Why won't data values update?
    By mssbass in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 09-30-2006, 04:40 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