LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 396
Default Insert value from vlookup and not formula with VBA

Hi all, could you please advise me how to change the script below. The
script inserts the Vlookup formulas and i was wondering if it is
possible just to put in the values and not the formula. If this is
possible, could you show me how to change the script.

Sub Lookups()

Dim myLookUpRng As Range
Application.StatusBar = "Your prices are being compared to the
supplier prices"
Range("D4").Select
With Workbooks(SuppFileNameC).Worksheets(SheetName)
Set myLookUpRng = .Range("D:N")
End With
Do Until ActiveCell = ""
ActiveCell.Offset(0, 8).FormulaR1C1 _
= "=VLOOKUP(RC[-8]," _
& myLookUpRng.Address(external:=True,
ReferenceStyle:=xlR1C1) _
& ",9,0)"
ActiveCell.Offset(0, 9).FormulaR1C1 _
= "=VLOOKUP(RC[-9]," _
& myLookUpRng.Address(external:=True,
ReferenceStyle:=xlR1C1) _
& ",10,0)"
ActiveCell.Offset(1, 0).Select
Loop
Range("A4").Select
' InsPriceDiff
End Sub


Thanks in advance.

best regards,

Les Stout

*** Sent via Developersdex http://www.developersdex.com ***
 
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
How do I insert a dynamic reference of a range inside VLOOKUP? Alexandre Excel Worksheet Functions 4 June 24th 09 03:28 PM
Vlookup to insert num in mult. columns Duplatt Excel Discussion (Misc queries) 8 December 23rd 07 11:07 PM
VLOOKUP insert rows Positive Excel Worksheet Functions 1 July 10th 07 09:48 PM
how do I insert picture into cell so vlookup can return picture? ah Excel Worksheet Functions 1 May 1st 07 04:38 AM
VBA insert messing up Vlookup and Match Sauron[_3_] Excel Programming 12 January 8th 04 05:19 PM


All times are GMT +1. The time now is 08:19 AM.

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

About Us

"It's about Microsoft Excel"