+ Reply to Thread
Results 1 to 9 of 9

Thread: Consolidate and sort data

  1. #1
    Registered User
    Join Date
    05-24-2010
    Location
    Perth, Australia
    MS-Off Ver
    Excel 2007
    Posts
    6

    Arrow Consolidate and sort data

    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
    Attached Images Attached Images
    Last edited by ArnoOtto; 05-24-2010 at 10:46 PM. Reason: add an example

  2. #2
    Registered User
    Join Date
    05-24-2010
    Location
    Perth, Australia
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Problems consolidating and sorting data with time

    Alternatively if anyone has a macro which will just delete the unwanted cells (i.e.) one of the time cells and the empty cells.

  3. #3
    Forum Guru
    Join Date
    10-28-2008
    Location
    Not here anymore
    MS-Off Ver
    irrelevant
    Posts
    10,151

    Re: Problems consolidating and sorting data with time

    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

  4. #4
    Registered User
    Join Date
    05-24-2010
    Location
    Perth, Australia
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Problems consolidating and sorting data with time

    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.
    Attached Images Attached Images

  5. #5
    Forum Guru
    Join Date
    10-28-2008
    Location
    Not here anymore
    MS-Off Ver
    irrelevant
    Posts
    10,151

    Re: Problems consolidating and sorting data with time

    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.

  6. #6
    Registered User
    Join Date
    05-24-2010
    Location
    Perth, Australia
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Problems consolidating and sorting data with time

    That worked the charm, thanks very much.

  7. #7
    Registered User
    Join Date
    05-24-2010
    Location
    Perth, Australia
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Consolidate and sort data

    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.
    Attached Files Attached Files

  8. #8
    Forum Guru
    Join Date
    10-28-2008
    Location
    Not here anymore
    MS-Off Ver
    irrelevant
    Posts
    10,151

    Re: Consolidate and sort data

    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.

    Sub 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
    cheers

  9. #9
    Registered User
    Join Date
    05-24-2010
    Location
    Perth, Australia
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Consolidate and sort data

    Hi Teylyn,

    That worked like magic, thanks again.

    Arno

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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.2.0