@aqiff
we can handle this by a stack concept:
lets group dt2 data on the Destinations
Iterate over the groups
lets create some immediate helper stacks with the information of row indes and Minutes as double
as long we do have items on the stacks
find the closest match (done with an Match.Abs(d1Min-d2Min for getting the absolute diferrence)
Update the datarow from d1 with an modified ItemArray
remove found items from the Stacks
Loop watches:
Result:
find starter help here:
MergeClosestDiff_StackApproach.xaml (19.7 KB)