vlookup VBA code

fabiogiallo

New Member
Joined
Mar 1, 2018
Messages
6
Good afternoon,

Please can you suggest me a vba code to replace this one below:

ActiveCell.FormulaR1C1 = "=VLOOKUP(Sheet2!RC[-1],R1C1:R109C19,7,FALSE)"
Selection.AutoFill Destination:=Range("B2:B15693")

this just copy the function to every cell in the column and i don't want this because i have to repeat this for many columns this would affect the size of the file.

Thank you.
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
I would like to know if there is a vba code that perform the same action without writing the function on every cell of the column.
 
Upvote 0
Selection.AutoFill Destination:=Range("B2:B15693"), either delete this line or put an apostophe before it ' to make it a comment
 
Upvote 0

Forum statistics

Threads
1,223,898
Messages
6,175,274
Members
452,628
Latest member
dd2

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