View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
monika monika is offline
external usenet poster
 
Posts: 27
Default replacing varaibles in formula

I have "G:\04 Assembly Cost\+06 FY
03_04\TCR2003_Assembly_0305.xls" in a
variable path1 and the worksheet name "TCR2003 by packages"
in another
variable "wkshName".

how can I replace the 'G:\04 Assembly Cost\+06 FY
03_04\[TCR2003_Assembly_0305.xls]TCR2003 by packages' in
the vlookup formula
below by the variables path1 and wkshName???

Cells(rowSt, z) = "=( VLOOKUP(" & Cells(rowSt,
packRng.Column).Address &
",'G:\04 Assembly Cost\+06 FY
03_04\[TCR2003_Assembly_0305.xls]TCR2003 by
packages'!$B$4:$G$251,4,FALSE)" & ")"

Thanks
monika