ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   vba for lookup and autofill (https://www.excelbanter.com/excel-programming/332613-vba-lookup-autofill.html)

delmac

vba for lookup and autofill
 
Hi all, I'm creatinf a vlookup from a column in one shhet to a column in
another, I then want to autofill to the end of the column automatically .
Can anyone help.
Thanks a lot.
--
delmac

Bob Phillips[_7_]

vba for lookup and autofill
 
You don't give many details, but this sets up a typical formula in B1, and
copies down 100 rows

With Range("B1")
.FormulaR1C1 = "=VLOOKUP(RC[-7],Sheet2!RC[-2]:R[13]C[4],2,FALSE)"
.AutoFill Range("B1").Resize(100)
End With


--
HTH

Bob Phillips

"delmac" wrote in message
...
Hi all, I'm creatinf a vlookup from a column in one shhet to a column in
another, I then want to autofill to the end of the column automatically .
Can anyone help.
Thanks a lot.
--
delmac





All times are GMT +1. The time now is 03:20 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com