Match sorted column data

  • Need to match Date and Time in "B" [800 rows of data] to "A" [2500 rows of data] and then insert "B" data in correct row matching "A"s 2500 rows. If no match then the appropriate blanks.


    In other words, list Data "B" in Data "A"s simular Date and Time Row.


    DATA "A": DATA "B":
    Row Date Time A Date Time Bp Bv
    1 6/10 9:29 567 6/10 9:31 0.60 2
    2 6/10 9:30 567 6/10 9:32 0.60 10
    3 6/10 9:31 567 6/10 9:36 0.60 5
    4 6/10 9:32 567 6/10 9:37 0.60 103
    5 6/10 9:33 567 6/10 9:38 0.55 120
    6 6/10 9:34 568 6/10 9:39 0.60 20
    . . . . . . . .
    800 6/14 9:32 567 6/14 9:32 567.41 50
    . . . .
    2500 6/17 16:59 572


    This is how the finished file should look like [date and times matching up]:
    DATA "A": DATA "B":
    Row Date Time A Date Time Bp Bv
    1 6/10 9:29 567
    2 6/10 9:30 567
    3 6/10 9:31 567 6/10 9:31 0.60 2
    4 6/10 9:32 567 6/10 9:32 0.60 103
    5 6/10 9:33 567
    6 6/10 9:34 568 6/10 9:34 0.60 20
    . . . . . . . .
    800 6/14 9:32 567 6/14 9:32 567.41 50
    . . . .
    2500 6/17 16:59 572

    Please advise.
    Thanks,
    Joe

  • Re: Match sorted column data


    Welcome to the OzGrid Forum Joe!


    Just to be sure I understand the situation before suggesting a solution. Are the data all on the same sheet in the first 7 columns as your layout suggests and you want the B data in columns D:G realigned to match? Will there always be a match for the 800 items in B? If not, what should be done with the mismatched items?

  • Re: Match sorted column data


    Hi,
    I reorganized the data and uploaded in .jpeg file to hopefully make it easier to figure out. All Data "B" should match some time and date in Data "A".


    Data "A" is minute and day results for a stock. Data "B" is minute and day results for an associated option. Problem is that an option [Data "B"] may not sell every minute, whereas the stock [Data "A"] does sell every minute.


    Thanks,
    Joe