What's the closest thing to of vlookup in vba?

User Name

Spammer
Joined
Aug 10, 2010
Messages
182
I want to look up a value in column F and return the value in the next column over. I'm successfully using the instruction below but I was wondering how this might be done in VBA without calling on a worksheet function?

HTML:
Baseline_Quantity = Application.VLookup(Baseline_to_Find, Worksheets("Baseline Quantities").Range("F2:G200"), 2, False)
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
You could write a custom function that will return the same result, however why would you if VLOOKUP gives you the result you need??
 
Upvote 0
You make a good point. I was thinking a VBA based lookup function would be quicker. I was also thinking I should learn how to do a find from VBA just so I know how to do it. I thought it might come in handy some day. Make any sense?

But hey... No worries. vlookup works just fine for now.
 
Upvote 0

Forum statistics

Threads
1,224,518
Messages
6,179,254
Members
452,900
Latest member
LisaGo

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