Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Vlookup formula script
hi all,
I've got this script ActiveCell.FormulaR1C1 = "=VLOOKUP(RC[2],R6C[-8]:R65536C[-2],7,1)" ActiveCell.Copy Range(Range("N6"), Range("N6").Offset(0, 1) _ .End(xlDown).Offset(0, -1)).Select ActiveSheet.Paste which is basically the forumla =VLOOKUP(P6,F$6:L$65536,7,1) How to I add those $ signs into the script as it does not recognise it??Please help...thank you so much |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Vlookup formula script
try it this way. Suggest you change your 65536 to something more realistic.
Sub doformulas() Range(Range("N6"), Range("N6").Offset(0, 1) _ .End(xlDown).Offset(0, -1)).Formula = _ "=VLOOKUP(P6,F$6:L$65536,7,1)" End Sub -- Don Guillett Microsoft MVP Excel SalesAid Software "Gor_yee" wrote in message ups.com... hi all, I've got this script ActiveCell.FormulaR1C1 = "=VLOOKUP(RC[2],R6C[-8]:R65536C[-2],7,1)" ActiveCell.Copy Range(Range("N6"), Range("N6").Offset(0, 1) _ .End(xlDown).Offset(0, -1)).Select ActiveSheet.Paste which is basically the forumla =VLOOKUP(P6,F$6:L$65536,7,1) How to I add those $ signs into the script as it does not recognise it??Please help...thank you so much |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
help with the VB script | Excel Worksheet Functions | |||
I need some VB script please | Excel Discussion (Misc queries) | |||
How can I script formula? | Excel Worksheet Functions | |||
VB script help - please!! | Excel Discussion (Misc queries) | |||
VB script help..please !! | Excel Worksheet Functions |