+ Reply to Thread
Results 1 to 5 of 5

copy/paste multiple values based on time/date stamp

  1. #1
    Registered User
    Join Date
    02-16-2012
    Location
    Dallas, TX
    MS-Off Ver
    Excel 2010
    Posts
    6

    copy/paste multiple values based on time/date stamp

    I have two sets of columns. Each set has two columns.

    For the 1st set, the left column is a date/time stamp, and the right column is an input value. These values have generally been taken every other hour, with a few consecutive hours mixed in.

    For the 2nd set, the left column is a date/time stamp, and the right column is an output value. These values have generally been taken every hour, with a few skipped hours of no values.

    I would like to create a 3rd set with three columns: #1 = date/time stamp (every consecutive hour - no problem I can do that); #2 input values; #3 output values. Here are is my issues - how would I copy from the 1st set and then paste to the 3rd set #2 column according to is associated date/time stamp? And then how would I copy from the 2nd set and then paste to the 3rd set #3 column according to its associated date/time stamp? I have over 10,000 data points so I was hoping there is a repetitive process.

    Thanks for any help you can provide.

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: copy/paste multiple values based on time/date stamp

    It will be good if you post some sample data. Upload an excel file with some dummy data in the exact same layout as your original data.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,944

    Re: copy/paste multiple values based on time/date stamp

    Sounds like a vlookup would work for this.

    =vlookup("the time you want",range,"table1 col2,false)
    and then the same for the next column.

    However, this will only find the 1st reference to the time you are looking at and would ignore any additional references to that same time
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Registered User
    Join Date
    02-16-2012
    Location
    Dallas, TX
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: copy/paste multiple values based on time/date stamp

    @ arlu1201: Please find some data attached from my spreadsheet. As you can see in set #1 and #2, if you look at the same row, there are different times becuase of the hourly or every other hour data input which makes it impossible to copy and paste a whole set of data from either #1 or #2 into #3 because they would not line up with the correct time in #3.

    @ fdibbins: thanks for the tip. i will try that and see if it works.
    Attached Files Attached Files

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,944

    Re: copy/paste multiple values based on time/date stamp

    Attached find what you need. Frim Set 1, only 2 times matchm and from set 3, only 3 times match.

+ 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