Thread: VLookup problem
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Al[_4_] Al[_4_] is offline
external usenet poster
 
Posts: 4
Default VLookup problem

A sheet named "Prices" contains my Lookup_value. It always be in row 3 from columns C:CQ
A sheet named "Today" contains my Table_array (cellsA1:B100).
The Column_index_num is 2.
Range_lookup is "False".

For the active row in "Prices" (row number is changed daily)
I've been trying to add macro lines that will paste a formula into the columns of the active row

Sheets("Prices").Select
ActiveCell.Offset(0, 2).Range("A1").Select
ActiveCell.FormulaR1C1 = "=VLOOKUP(Lookup_Value,Table_array,FALSE,2)"
Selection.Copy
ActiveCell.Offset(0, 1).Range("A1:AZ1").Select
Selection.PasteSpecial Paste:=xlPasteFormulas, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False

I'm having trouble getting the proper references for the formula code in the macro for Lookup_Value and Table_array.
Again the Lookup_value is on "Prices" in row 3 of the column while the Table_array is always on "Today" (cellsA1:B100).

Thanks
Al