Hi, I'm having some issues trying to consolidate and sort data with their time stamp.
Basically I have a couple of different series and I'm looking to plot them in excel. The problem is that the time stamps are different as is the sampling rate. Is there an easy way to sort this out, I've tried to use the sort function but I just end up with a whole lot of empty spaces and a big mess.
I've attached an example, the data set itself is much bigger and there are many many more columns.
Any help would be very much appreciated,
Cheers
Last edited by ArnoOtto; 05-24-2010 at 10:46 PM. Reason: add an example
Alternatively if anyone has a macro which will just delete the unwanted cells (i.e.) one of the time cells and the empty cells.
Hello ArnoOtto,
Plot the series in a XY chart instead of a line chart. You can have a line for each series and the x axis values will be aligned.
If you post a spreadsheet instead of an image, you'll get a chart suggestion in return.
cheers
Hi I've tried to do the xy scatter but for some reason when I take off the markers the lines will not join up. I've added a picture as it's a large data set.
Thanks in advance.
Arno,
click the chart, then the Design tab on the Chart tools,
click Select Data and then the button "Hidden and Empty Cells"
click "Connect data points with line" and OK
If that does not help, please post a workbook with sample data and the chart.
That worked the charm, thanks very much.
Hi, now I seem to have a data column that just doesn't want to play along. I've checked the connect data points with line box, however for some reason it still insists on displaying the empty cells as '0'. I've also tried to copy and paste values etc.
Part of the data set is attached.
Thanks again.
Arno,
although the cells appear to be empty and have a length of zero, they are not truly blank.
If you select each cell and hit the delete key, you will see your chart starting to tidy up.
Now, normally, I'd go F5 - Special - Blanks to select them all, but this does not work, since they are not blank. They contain a null string "".
I tried Find and replace, but to no avail.
So, out with the bigger guns.
Copy the code below, then right-click on the sheet tab and select View Code. Paste the code into the code window. Click somewhere in the code and hit F5 to run the code.
Before you do that, arrange your windows so you can see both the code window and your chart. You'll see the zero plot points disappear in a nice pseudo animation.
cheersSub RemoveBlanks() Dim cel As Range, x As Long x = Cells(Rows.Count, "A").End(xlUp).Row For Each cel In Range("B1:B" & x) If cel = "" Then cel.ClearContents Next End Sub
Hi Teylyn,
That worked like magic, thanks again.
Arno
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks