Vlookup on minimum difference - VBA loop

cjohnson309

New Member
Joined
Nov 27, 2017
Messages
1
Hey All,

This is my first post on the website.

I'm looking to get a vlookup value based on the closest value. I have 3 different buckets with their different numbers. They do not exactly match the list on the left so i'm looking for a formula / VBA loop to automatically show the bucket name like so below next to the closest value.

I'm really looking for a VBA loop where it will first set Bucket #1 to the closest value, then when it is set, it will move on to Bucket #2 , etc.

Thanks!
Connor
5Bucket #1 11
10Bucket #1 Bucket #2 32
15Bucket #346
20
25
30Bucket #2
35
40
45Bucket #3

<tbody>
</tbody>
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK

Forum statistics

Threads
1,215,339
Messages
6,124,381
Members
449,155
Latest member
ravioli44

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