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

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
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
Fabio, hai risolto?
Fabio, did you get the solution?
 
Upvote 0

Forum statistics

Threads
1,216,458
Messages
6,130,757
Members
449,588
Latest member
accountant606

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