View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
[email protected] clsnyder@gmail.com is offline
external usenet poster
 
Posts: 3
Default VB formula referencing other worksheet

Hi

I have a macro that fills in some data, and makes the last cell in the
row the active cell. I want to use the vlookup function to get a
calculated value for the last cell of that row. I don't seem to be able
to correctly reference the lookup table (in another worksheet in the
same workbook, and labelled as RVU Lookup)

ActiveCell.FormulaR1C1 = "CMH"
ActiveCell.Offset(0, 1).Select
ActiveCell.FormulaR1C1 = "No"
rvu = ActiveCell.Offset(0, 1).Select
ActiveCell.FormulaR1C1 = VLOOKUP(rvu,'RVU Lookup'!A3:B7213,2,FALSE)

doesn't work

Thanks in advance

CLS