Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 38
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,124
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
help with the VB script Igneshwara reddy[_2_] Excel Worksheet Functions 4 March 6th 07 08:54 PM
I need some VB script please rlee1999 Excel Discussion (Misc queries) 2 October 25th 06 05:46 PM
How can I script formula? Sam Excel Worksheet Functions 2 July 10th 06 06:22 AM
VB script help - please!! Anthony Excel Discussion (Misc queries) 1 July 13th 05 01:19 AM
VB script help..please !! Anthony Excel Worksheet Functions 2 June 5th 05 03:26 PM


All times are GMT +1. The time now is 10:59 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"