+ Reply to Thread
Results 1 to 2 of 2

Aliging column data from different rows

Hybrid View

  1. #1
    Registered User
    Join Date
    04-30-2008
    Posts
    1

    Aliging column data from different rows

    Dear readers,

    I have a problem with aligning data from 2 different columns with one.. and have tried various things but to no success.

    I am trying to align data at 5min time intervals on a row by row basis, so for example, the time interval 20:05 will have the values 5 and 10 on the same row rather than different ones like below. Columns B and D do not always have values for each row of Column A and C (they are blank as no data was obtained for that specific time interval):

    Column A Column B Column C Column D
    20:05 5 20:00
    20:45 7 20:05 10
    20:55 20:40 8
    21:05 11 20:45 5
    21:10 18 21:05 4
    21:15 2 21:10 15
    21:20 4 21:15
    21:35 21:25 9
    22:10 11 21:30 8


    And so on... etc.

    I want to get the following arrangment from the above data:

    Column A Column B Column C
    20:00 5
    20:05 7 10
    20:10
    20:15 2
    20:20 4
    20:25
    20:30 11
    20:35
    20:40 8
    20:45 5
    20:50
    20:55
    21:00
    21:05 11 4
    21:10 18 15
    21:15
    21:20
    21:25 9
    21:30 8

    And so on... etc.

    Is there any way of doing this on Excel? I have hundreds of lines which are not arranged, hence this would help me big time if there is.

    Kind regards to all who reply.

    Shimu

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582
    Will there ever be more than 2 values per time interval?

    Here's the simplest way to do it. It requires some manual manipulation but no VBA.

    1. Copy and paste all your times and data into columns A and B.
    2. Sort on time
    3. In column C2 (assuming your data begins in A2), put the formula
    =IF(A2=A3,B3,"")
    Drag this all the way down.
    4. If you can have more than 2 values for each, in D2 put the formula
    =IF(A2=A4,B4,"")
    Drag down. Continue out until you don't have any more replicates.
    5. Copy columns C, D, etc and paste Special (in place) > Values thus removing the formulas.
    6. Use the autofilter to find blanks in column C and delete those rows.

    ChemistB
    Last edited by ChemistB; 04-30-2008 at 09:59 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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