Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Geeske Bakker   on Feb 01 In MS Office Category.

  
Question Answered By: Sairah Hashmi   on Feb 01

You're trying to enter formulae into the worksheet cells with the word
'Cells' in as well as a few other variables which you may not have
defines as Names.

Try something on the lines of:
Selection.FormulaR1C1 = "=VLOOKUP(" & Cells(KeyStartRow,
TitleCol).Address(ReferenceStyle:=xlR1C1) & ",'Ref.Tables
'!C[4]:C[5],2,FALSE)"

or:
Selection.Formula = "=VLOOKUP(" & Cells(KeyStartRow,
TitleCol).Address(RowAbsolute:=False, ColumnAbsolute:=False) &
",'Ref.Tables'!D:E,2,FALSE)"

Share: