+ Reply to Thread
Results 1 to 11 of 11

Problem with sorting data - Please help!

  1. #1
    Registered User
    Join Date
    03-09-2014
    Location
    Ireland
    MS-Off Ver
    Excel 2013
    Posts
    13

    Problem with sorting data - Please help!

    Hi,

    I am working on a project where I am downloading data from a BMS interface. I am currently focusing on 2 different sensors but for one year the two sensors do not have the same amount of readings. I need to sort my data according to 2 columns (timestamp for each reading).

    My sheet looks something like this:

    Date and Time | Room Temp | Date and Time | External Temp
    03/07/2011 00:15 | 19 | 03/07/2011 00:15 | 5
    03/07/2011 00:30 | 19.5 | 03/07/2011 00:30 | 4
    03/07/2011 00:45 | 19 | 03/07/2011 01:00 | 6
    03/07/2011 02:00 | 20 | 03/07/2011 02:15 | 7

    The data is not sorted correctly so I need some way of srting the data so that columns A and C will be equal and columns B is locked to column A and column D is locked to column C if that makes sense. I am willing to use Macros.

    I am trying to sort manually but there is over 33,000 rows of data and I must do this for a number of sheets.

    Any help on this would be greatly greatly appreciated as the deadline is rapidly approaching and this is holding me up big time!!

    Thank you!

    Jimmy

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Problem with sorting data - Please help!

    You get better help if you add an small example of your excel file, without confidential information.

    Please also add the desired (expected) result.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    Registered User
    Join Date
    03-09-2014
    Location
    Ireland
    MS-Off Ver
    Excel 2013
    Posts
    13

    Re: Problem with sorting data - Please help!

    Hi Oeldere,

    Thanks for the advice.

    See attached my excel workbook.

    I want to sort the data so that the timestamps (column A and C) correctly correspond to each other along with the temperature readings. From the attached file it is easy to fix the first instance by inserting cells but this may need to be done up to fifty times per sheet for plus 10 sheets.

    Thank you.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    03-07-2014
    Location
    North Carolina, USA
    MS-Off Ver
    Excel 2010 and 2013
    Posts
    21

    Re: Problem with sorting data - Please help!

    Try this. Sort on column A. I'm not sure exactly what you are after though.
    Attached Files Attached Files
    Regards,
    Hansens 0ffice dot com

  5. #5
    Registered User
    Join Date
    03-09-2014
    Location
    Ireland
    MS-Off Ver
    Excel 2013
    Posts
    13

    Re: Problem with sorting data - Please help!

    Hi Hansen,

    Thanks for your time!

    That won't do it I am afraid.

    See Cell E3 and G3 in your reply - these are not the same. I want to sort the data so that the temperature reading for each timestamp are populated to cells next to each other so that I can easily find the difference between the values by applying a simple formula.

    So for example, if possible, is for the timestamp 04/07/2011 00:30 temp reading (Cell F11) to be populated next to the external temperature reading with the same timesptamp (Cell F12). It is simple to insert rows to here to do it but it is recurring a lot as there are no readings for quite a lot of timestamps.

    Thanks

  6. #6
    Registered User
    Join Date
    03-07-2014
    Location
    North Carolina, USA
    MS-Off Ver
    Excel 2010 and 2013
    Posts
    21

    Re: Problem with sorting data - Please help!

    So you are trying get the two temps into the same row for the given time stamp?
    Attached Files Attached Files

  7. #7
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Problem with sorting data - Please help!

    There's a workbook at https://app.box.com/shared/elrnbidnr7 with a macro that will do this:


    A
    B
    C
    D
    2
    Date and Time Room Date and Time External
    3
    07/03/2011 08:00
    22.7
    4
    07/03/2011 08:15
    22.7
    07/03/2011 08:15
    17.4
    5
    07/03/2011 08:30
    22.8
    07/03/2011 08:30
    17.6
    2793
    08/01/2011 23:45
    22.5
    08/01/2011 23:45
    15.2
    2794
    08/02/2011 00:00
    0
    2795
    08/03/2011 10:00
    24.3
    08/03/2011 10:00
    18.7
    2796
    08/03/2011 10:15
    24.3
    08/03/2011 10:15
    19
    2797
    08/03/2011 10:30
    24.5
    08/03/2011 10:30
    19.5
    5634
    09/01/2011 23:45
    23.2
    09/01/2011 23:45
    16.6
    5635
    09/02/2011 00:00
    16.6
    5636
    09/02/2011 00:15
    16.6
    5637
    09/02/2011 00:30
    16.6
    5638
    09/02/2011 00:45
    16.6
    5639
    09/02/2011 01:00
    17
    5640
    09/03/2011 17:00
    23.4
    5641
    09/03/2011 17:15
    23.4
    5642
    09/03/2011 17:30
    23.4
    5643
    09/03/2011 17:45
    23.4
    5644
    09/03/2011 18:00
    23.3
    5645
    09/03/2011 18:15
    23.1
    09/03/2011 18:15
    14.1
    5646
    09/03/2011 18:30
    23
    09/03/2011 18:30
    14.3
    5647
    09/03/2011 18:45
    23.1
    09/03/2011 18:45
    14.4
    5648
    09/03/2011 19:00
    23
    09/03/2011 19:00
    14.4


    Note that I've hidden a lot of matching rows to illustrate.
    Entia non sunt multiplicanda sine necessitate

  8. #8
    Registered User
    Join Date
    03-09-2014
    Location
    Ireland
    MS-Off Ver
    Excel 2013
    Posts
    13

    Re: Problem with sorting data - Please help!

    Hi Hansen,

    That is exactly it.

    Thank you very much for your help and time!! Saved me alot of time!!

    Thanks again.

  9. #9
    Registered User
    Join Date
    03-09-2014
    Location
    Ireland
    MS-Off Ver
    Excel 2013
    Posts
    13

    Re: Problem with sorting data - Please help!

    Sgh,

    That's fantastic!

    Thank you both!

  10. #10
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Problem with sorting data - Please help!

    Here is your workbook with two VLOOKUP formulae to match the dates and times in the Interior and Exterior readings. The yellow shaded area has the formulae.
    Attached Files Attached Files
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  11. #11
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Problem with sorting data - Please help!

    You're welcome.

+ 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 2008 : sorting data problem
    By magsyoung in forum Excel General
    Replies: 3
    Last Post: 07-15-2010, 03:02 PM
  2. Data sorting problem
    By antesamegutt in forum Excel General
    Replies: 2
    Last Post: 09-29-2009, 11:23 AM
  3. Problem Sorting Data
    By Alhazred in forum Excel General
    Replies: 11
    Last Post: 03-10-2008, 02:43 PM
  4. Problem with Sorting Data
    By reggiebu in forum Excel General
    Replies: 2
    Last Post: 06-09-2005, 05:05 PM
  5. [SOLVED] data sorting problem
    By Pong in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 02-18-2005, 02:06 PM

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.6.0 RC 1