Closest match for a data set

dbcooper88

New Member
Joined
Dec 3, 2016
Messages
36
Hello all. Im looking for the closest match for a data set. Here is the data:



[TABLE="width: 0"]
<tbody>[TR]
[TD]A
[/TD]
[TD]B
[/TD]
[/TR]
[TR]
[TD]1
[/TD]
[TD]959.5
[/TD]
[/TR]
[TR]
[TD]2
[/TD]
[TD]909
[/TD]
[/TR]
[TR]
[TD]3
[/TD]
[TD]858.5
[/TD]
[/TR]
[TR]
[TD]4
[/TD]
[TD]858.5
[/TD]
[/TR]
[TR]
[TD]5
[/TD]
[TD]858.5
[/TD]
[/TR]
[TR]
[TD]6
[/TD]
[TD]910
[/TD]
[/TR]
[TR]
[TD]7
[/TD]
[TD]758.5
[/TD]
[/TR]
[TR]
[TD]8
[/TD]
[TD]808
[/TD]
[/TR]
[TR]
[TD]9
[/TD]
[TD]808
[/TD]
[/TR]
[TR]
[TD]10
[/TD]
[TD]858.5
[/TD]
[/TR]
[TR]
[TD]11
[/TD]
[TD]909
[/TD]
[/TR]
[TR]
[TD]12
[/TD]
[TD]757.5
[/TD]
[/TR]
</tbody>[/TABLE]


How would you find the three consecutive closest match for the last three B's (858.5,909,757.5)? Answer should be 858.5,910,758 which correspond to A’s 5,6,7. TIA
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
Hello all. Im looking for the closest match for a data set. Here is the data:



[TABLE="width: 0"]
<tbody>[TR]
[TD]A[/TD]
[TD]B[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]959.5[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]909[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]858.5[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]858.5[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]858.5[/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]910[/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]758.5[/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD]808[/TD]
[/TR]
[TR]
[TD]9[/TD]
[TD]808[/TD]
[/TR]
[TR]
[TD]10[/TD]
[TD]858.5[/TD]
[/TR]
[TR]
[TD]11[/TD]
[TD]909[/TD]
[/TR]
[TR]
[TD]12[/TD]
[TD]757.5[/TD]
[/TR]
</tbody>[/TABLE]


How would you find the three consecutive closest match for the last three B's (858.5,909,757.5)? Answer should be 858.5,910,758 which correspond to A’s 5,6,7. TIA

This is a lot of statics. If I were you, I would go for VBA.
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,325
Members
452,635
Latest member
laura12345

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top