L
Legacy 367570
Guest
Hi All,
Bit of a complicated one. Any help much appreciated!!!
So I have two sets of data I want to link together.
Both have time stamps in format mm/dd/yyyy hh:mm in each row.
I for each row in table 1, I want to look at the time stamp, then return the details of the row in table 2 that occurs within 20 minutes AFTER the date and time stamp in table 1. The formula should ONLY return the row with the highest value based on another column
So
Table 1
[TABLE="class: grid, width: 500, align: center"]
<tbody>[TR]
[TD="align: center"]Name[/TD]
[TD="align: center"]Time[/TD]
[TD="align: center"]Output Data 1[/TD]
[TD="align: center"]Output Data 2[/TD]
[TD="align: center"]Output Data 3[/TD]
[/TR]
[TR]
[TD="align: center"]John[/TD]
[TD="align: center"]02/02/2016 08:45:00[/TD]
[TD][TABLE="width: 97"]
<tbody>[TR]
[TD="class: xl65, width: 97, align: center"]?[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD="align: center"]?[/TD]
[TD="align: center"]?[/TD]
[/TR]
[TR]
[TD][TABLE="width: 55"]
<tbody>[TR]
[TD="class: xl65, width: 55, align: center"]Luke[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 113"]
<tbody>[TR]
[TD="class: xl66, width: 113, align: center"]02/08/2016 06:00[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD="align: center"]?[/TD]
[TD="align: center"]?[/TD]
[TD="align: center"]?[/TD]
[/TR]
[TR]
[TD][TABLE="width: 55"]
<tbody>[TR]
[TD="class: xl65, width: 55, align: center"]Sarah[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 113"]
<tbody>[TR]
[TD="class: xl65, width: 113, align: center"]02/15/2016 12:52[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD="align: center"]?[/TD]
[TD="align: center"]?[/TD]
[TD="align: center"]?[/TD]
[/TR]
[TR]
[TD][TABLE="width: 55"]
<tbody>[TR]
[TD="class: xl65, width: 55, align: center"]Ben[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 113"]
<tbody>[TR]
[TD="class: xl65, width: 113, align: center"]02/20/2016 21:45[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD="align: center"]?[/TD]
[TD="align: center"]?[/TD]
[TD="align: center"]?[/TD]
[/TR]
</tbody>[/TABLE]
Table 2
[TABLE="class: grid, width: 500, align: center"]
<tbody>[TR]
[TD][TABLE="width: 55"]
<tbody>[TR]
[TD="class: xl65, width: 55, align: center"]Product[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 113"]
<tbody>[TR]
[TD="class: xl65, width: 113, align: center"]Time[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 97"]
<tbody>[TR]
[TD="class: xl65, width: 97, align: center"]Value[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 130"]
<tbody>[TR]
[TD="class: xl65, width: 130, align: center"]Additional Value 1[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 130"]
<tbody>[TR]
[TD="class: xl65, width: 130, align: center"]Additional Value 2[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 130"]
<tbody>[TR]
[TD="class: xl65, width: 130, align: center"]Additional Value 3[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD][TABLE="width: 55"]
<tbody>[TR]
[TD="class: xl65, width: 55, align: center"]Apple[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 113"]
<tbody>[TR]
[TD="class: xl65, width: 113, align: center"]02/15/2016 08:55[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 97"]
<tbody>[TR]
[TD="class: xl65, width: 97, align: center"]5.665[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD="align: center"]a[/TD]
[TD="align: center"]6[/TD]
[TD="align: center"]r[/TD]
[/TR]
[TR]
[TD][TABLE="width: 55"]
<tbody>[TR]
[TD="class: xl65, width: 55, align: center"]Orange[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 113"]
<tbody>[TR]
[TD="class: xl65, width: 113, align: center"]02/20/2016 06:08[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 97"]
<tbody>[TR]
[TD="class: xl65, width: 97, align: center"]3.874[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD="align: center"]5[/TD]
[TD="align: center"]w[/TD]
[TD="align: center"]x[/TD]
[/TR]
[TR]
[TD][TABLE="width: 55"]
<tbody>[TR]
[TD="class: xl65, width: 55, align: center"]Pear[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 113"]
<tbody>[TR]
[TD="class: xl66, width: 113, align: center"]02/02/2016 12:58[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 97"]
<tbody>[TR]
[TD="class: xl65, width: 97, align: center"]9.254[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD="align: center"]7[/TD]
[TD="align: center"]5[/TD]
[TD="align: center"]3[/TD]
[/TR]
[TR]
[TD][TABLE="width: 55"]
<tbody>[TR]
[TD="class: xl65, width: 55, align: center"]Water[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 113"]
<tbody>[TR]
[TD="class: xl66, width: 113, align: center"]02/08/2016 22:02[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 97"]
<tbody>[TR]
[TD="class: xl65, width: 97, align: center"]2.987[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD="align: center"]1[/TD]
[TD="align: center"]![/TD]
[TD="align: center"]=[/TD]
[/TR]
[TR]
[TD][TABLE="width: 55"]
<tbody>[TR]
[TD="class: xl65, width: 55, align: center"]Soda[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 113"]
<tbody>[TR]
[TD="class: xl66, width: 113, align: center"]02/08/2016 21:56[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 97"]
<tbody>[TR]
[TD="class: xl65, width: 97, align: center"]1.157[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD="align: center"]d[/TD]
[TD="align: center"]w[/TD]
[TD="align: center"]d[/TD]
[/TR]
[TR]
[TD][TABLE="width: 55"]
<tbody>[TR]
[TD="class: xl65, width: 55, align: center"]Coke[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 113"]
<tbody>[TR]
[TD="class: xl65, width: 113, align: center"]02/20/2016 06:18[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 97"]
<tbody>[TR]
[TD="class: xl65, width: 97, align: center"]3.997[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD="align: center"]1[/TD]
[TD="align: center"]2[/TD]
[TD="align: center"]3[/TD]
[/TR]
</tbody>[/TABLE]
Output
[TABLE="class: grid, width: 500, align: center"]
<tbody>[TR]
[TD][TABLE="width: 55"]
<tbody>[TR]
[TD="class: xl65, width: 55, align: center"]Name[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD="align: center"]Time[/TD]
[TD="align: center"]Product[/TD]
[TD="align: center"]Time[/TD]
[TD="align: center"]Value[/TD]
[TD][TABLE="width: 130"]
<tbody>[TR]
[TD="class: xl65, width: 130, align: center"]Additional Value 1[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 130"]
<tbody>[TR]
[TD="class: xl65, width: 130, align: center"]Additional Value 2[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 130"]
<tbody>[TR]
[TD="class: xl65, width: 130, align: center"]Additional Value 3[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD="align: center"]John[/TD]
[TD][TABLE="width: 113"]
<tbody>[TR]
[TD="class: xl66, width: 113, align: center"]02/02/2016 08:45[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 97"]
<tbody>[TR]
[TD="class: xl65, width: 97, align: center"]Apple[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 130"]
<tbody>[TR]
[TD="class: xl65, width: 130, align: center"]02/15/2016 08:55[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 130"]
<tbody>[TR]
[TD="class: xl65, width: 130, align: center"]5.665[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD="align: center"]a[/TD]
[TD="align: center"]6[/TD]
[TD="align: center"]r[/TD]
[/TR]
[TR]
[TD="align: center"]Luke[/TD]
[TD][TABLE="width: 113"]
<tbody>[TR]
[TD="class: xl66, width: 113, align: center"]02/08/2016 06:00[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 97"]
<tbody>[TR]
[TD="class: xl65, width: 97, align: center"]Coke[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 130"]
<tbody>[TR]
[TD="class: xl65, width: 130, align: center"]02/20/2016 06:18[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 130"]
<tbody>[TR]
[TD="class: xl65, width: 130, align: center"]3.997[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD="align: center"]1[/TD]
[TD="align: center"]2[/TD]
[TD="align: center"]3[/TD]
[/TR]
[TR]
[TD="align: center"]Sarah[/TD]
[TD][TABLE="width: 113"]
<tbody>[TR]
[TD="class: xl65, width: 113, align: center"]02/15/2016 12:52[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 97"]
<tbody>[TR]
[TD="class: xl65, width: 97, align: center"]Pear[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 130"]
<tbody>[TR]
[TD="class: xl66, width: 130, align: center"]02/02/2016 12:58[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 130"]
<tbody>[TR]
[TD="class: xl65, width: 130, align: center"]9.254[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD="align: center"]7[/TD]
[TD="align: center"]5[/TD]
[TD="align: center"]3[/TD]
[/TR]
[TR]
[TD="align: center"]Ben[/TD]
[TD][TABLE="width: 113"]
<tbody>[TR]
[TD="class: xl65, width: 113, align: center"]02/20/2016 21:45[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 97"]
<tbody>[TR]
[TD="class: xl65, width: 97, align: center"]Water[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 130"]
<tbody>[TR]
[TD="class: xl66, width: 130, align: center"]02/08/2016 22:02[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 130"]
<tbody>[TR]
[TD="class: xl65, width: 130, align: center"]2.987[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD="align: center"]1[/TD]
[TD="align: center"]![/TD]
[TD="align: center"]=[/TD]
[/TR]
</tbody>[/TABLE]
As you can see above, each of the returned rows are within 20 minutes after the original, and for Ben and Luke, return the rows with the highest value.
Any ideas on how I can achieve this?
Thanks in advance!
Bit of a complicated one. Any help much appreciated!!!
So I have two sets of data I want to link together.
Both have time stamps in format mm/dd/yyyy hh:mm in each row.
I for each row in table 1, I want to look at the time stamp, then return the details of the row in table 2 that occurs within 20 minutes AFTER the date and time stamp in table 1. The formula should ONLY return the row with the highest value based on another column
So
Table 1
[TABLE="class: grid, width: 500, align: center"]
<tbody>[TR]
[TD="align: center"]Name[/TD]
[TD="align: center"]Time[/TD]
[TD="align: center"]Output Data 1[/TD]
[TD="align: center"]Output Data 2[/TD]
[TD="align: center"]Output Data 3[/TD]
[/TR]
[TR]
[TD="align: center"]John[/TD]
[TD="align: center"]02/02/2016 08:45:00[/TD]
[TD][TABLE="width: 97"]
<tbody>[TR]
[TD="class: xl65, width: 97, align: center"]?[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD="align: center"]?[/TD]
[TD="align: center"]?[/TD]
[/TR]
[TR]
[TD][TABLE="width: 55"]
<tbody>[TR]
[TD="class: xl65, width: 55, align: center"]Luke[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 113"]
<tbody>[TR]
[TD="class: xl66, width: 113, align: center"]02/08/2016 06:00[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD="align: center"]?[/TD]
[TD="align: center"]?[/TD]
[TD="align: center"]?[/TD]
[/TR]
[TR]
[TD][TABLE="width: 55"]
<tbody>[TR]
[TD="class: xl65, width: 55, align: center"]Sarah[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 113"]
<tbody>[TR]
[TD="class: xl65, width: 113, align: center"]02/15/2016 12:52[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD="align: center"]?[/TD]
[TD="align: center"]?[/TD]
[TD="align: center"]?[/TD]
[/TR]
[TR]
[TD][TABLE="width: 55"]
<tbody>[TR]
[TD="class: xl65, width: 55, align: center"]Ben[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 113"]
<tbody>[TR]
[TD="class: xl65, width: 113, align: center"]02/20/2016 21:45[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD="align: center"]?[/TD]
[TD="align: center"]?[/TD]
[TD="align: center"]?[/TD]
[/TR]
</tbody>[/TABLE]
Table 2
[TABLE="class: grid, width: 500, align: center"]
<tbody>[TR]
[TD][TABLE="width: 55"]
<tbody>[TR]
[TD="class: xl65, width: 55, align: center"]Product[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 113"]
<tbody>[TR]
[TD="class: xl65, width: 113, align: center"]Time[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 97"]
<tbody>[TR]
[TD="class: xl65, width: 97, align: center"]Value[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 130"]
<tbody>[TR]
[TD="class: xl65, width: 130, align: center"]Additional Value 1[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 130"]
<tbody>[TR]
[TD="class: xl65, width: 130, align: center"]Additional Value 2[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 130"]
<tbody>[TR]
[TD="class: xl65, width: 130, align: center"]Additional Value 3[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD][TABLE="width: 55"]
<tbody>[TR]
[TD="class: xl65, width: 55, align: center"]Apple[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 113"]
<tbody>[TR]
[TD="class: xl65, width: 113, align: center"]02/15/2016 08:55[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 97"]
<tbody>[TR]
[TD="class: xl65, width: 97, align: center"]5.665[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD="align: center"]a[/TD]
[TD="align: center"]6[/TD]
[TD="align: center"]r[/TD]
[/TR]
[TR]
[TD][TABLE="width: 55"]
<tbody>[TR]
[TD="class: xl65, width: 55, align: center"]Orange[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 113"]
<tbody>[TR]
[TD="class: xl65, width: 113, align: center"]02/20/2016 06:08[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 97"]
<tbody>[TR]
[TD="class: xl65, width: 97, align: center"]3.874[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD="align: center"]5[/TD]
[TD="align: center"]w[/TD]
[TD="align: center"]x[/TD]
[/TR]
[TR]
[TD][TABLE="width: 55"]
<tbody>[TR]
[TD="class: xl65, width: 55, align: center"]Pear[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 113"]
<tbody>[TR]
[TD="class: xl66, width: 113, align: center"]02/02/2016 12:58[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 97"]
<tbody>[TR]
[TD="class: xl65, width: 97, align: center"]9.254[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD="align: center"]7[/TD]
[TD="align: center"]5[/TD]
[TD="align: center"]3[/TD]
[/TR]
[TR]
[TD][TABLE="width: 55"]
<tbody>[TR]
[TD="class: xl65, width: 55, align: center"]Water[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 113"]
<tbody>[TR]
[TD="class: xl66, width: 113, align: center"]02/08/2016 22:02[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 97"]
<tbody>[TR]
[TD="class: xl65, width: 97, align: center"]2.987[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD="align: center"]1[/TD]
[TD="align: center"]![/TD]
[TD="align: center"]=[/TD]
[/TR]
[TR]
[TD][TABLE="width: 55"]
<tbody>[TR]
[TD="class: xl65, width: 55, align: center"]Soda[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 113"]
<tbody>[TR]
[TD="class: xl66, width: 113, align: center"]02/08/2016 21:56[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 97"]
<tbody>[TR]
[TD="class: xl65, width: 97, align: center"]1.157[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD="align: center"]d[/TD]
[TD="align: center"]w[/TD]
[TD="align: center"]d[/TD]
[/TR]
[TR]
[TD][TABLE="width: 55"]
<tbody>[TR]
[TD="class: xl65, width: 55, align: center"]Coke[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 113"]
<tbody>[TR]
[TD="class: xl65, width: 113, align: center"]02/20/2016 06:18[/TD]
[/TR]
</tbody>[/TABLE]
[TD][TABLE="width: 97"]
<tbody>[TR]
[TD="class: xl65, width: 97, align: center"]3.997[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD="align: center"]1[/TD]
[TD="align: center"]2[/TD]
[TD="align: center"]3[/TD]
[/TR]
</tbody>[/TABLE]
Output
[TABLE="class: grid, width: 500, align: center"]
<tbody>[TR]
[TD][TABLE="width: 55"]
<tbody>[TR]
[TD="class: xl65, width: 55, align: center"]Name[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD="align: center"]Time[/TD]
[TD="align: center"]Product[/TD]
[TD="align: center"]Time[/TD]
[TD="align: center"]Value[/TD]
[TD][TABLE="width: 130"]
<tbody>[TR]
[TD="class: xl65, width: 130, align: center"]Additional Value 1[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 130"]
<tbody>[TR]
[TD="class: xl65, width: 130, align: center"]Additional Value 2[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 130"]
<tbody>[TR]
[TD="class: xl65, width: 130, align: center"]Additional Value 3[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD="align: center"]John[/TD]
[TD][TABLE="width: 113"]
<tbody>[TR]
[TD="class: xl66, width: 113, align: center"]02/02/2016 08:45[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 97"]
<tbody>[TR]
[TD="class: xl65, width: 97, align: center"]Apple[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 130"]
<tbody>[TR]
[TD="class: xl65, width: 130, align: center"]02/15/2016 08:55[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 130"]
<tbody>[TR]
[TD="class: xl65, width: 130, align: center"]5.665[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD="align: center"]a[/TD]
[TD="align: center"]6[/TD]
[TD="align: center"]r[/TD]
[/TR]
[TR]
[TD="align: center"]Luke[/TD]
[TD][TABLE="width: 113"]
<tbody>[TR]
[TD="class: xl66, width: 113, align: center"]02/08/2016 06:00[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 97"]
<tbody>[TR]
[TD="class: xl65, width: 97, align: center"]Coke[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 130"]
<tbody>[TR]
[TD="class: xl65, width: 130, align: center"]02/20/2016 06:18[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 130"]
<tbody>[TR]
[TD="class: xl65, width: 130, align: center"]3.997[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD="align: center"]1[/TD]
[TD="align: center"]2[/TD]
[TD="align: center"]3[/TD]
[/TR]
[TR]
[TD="align: center"]Sarah[/TD]
[TD][TABLE="width: 113"]
<tbody>[TR]
[TD="class: xl65, width: 113, align: center"]02/15/2016 12:52[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 97"]
<tbody>[TR]
[TD="class: xl65, width: 97, align: center"]Pear[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 130"]
<tbody>[TR]
[TD="class: xl66, width: 130, align: center"]02/02/2016 12:58[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 130"]
<tbody>[TR]
[TD="class: xl65, width: 130, align: center"]9.254[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD="align: center"]7[/TD]
[TD="align: center"]5[/TD]
[TD="align: center"]3[/TD]
[/TR]
[TR]
[TD="align: center"]Ben[/TD]
[TD][TABLE="width: 113"]
<tbody>[TR]
[TD="class: xl65, width: 113, align: center"]02/20/2016 21:45[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 97"]
<tbody>[TR]
[TD="class: xl65, width: 97, align: center"]Water[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 130"]
<tbody>[TR]
[TD="class: xl66, width: 130, align: center"]02/08/2016 22:02[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 130"]
<tbody>[TR]
[TD="class: xl65, width: 130, align: center"]2.987[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD="align: center"]1[/TD]
[TD="align: center"]![/TD]
[TD="align: center"]=[/TD]
[/TR]
</tbody>[/TABLE]
As you can see above, each of the returned rows are within 20 minutes after the original, and for Ben and Luke, return the rows with the highest value.
Any ideas on how I can achieve this?
Thanks in advance!