View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Dick Kusleika[_4_] Dick Kusleika[_4_] is offline
external usenet poster
 
Posts: 595
Default Help - applying macro to all files in folder

jrc


"=LOOKUP(""370302"",'[sFName]'!R2C2:R1308C2,'[sFName]'!R2C18:R1308C18)"
Range("I9").Select
ActiveCell.FormulaR1C1 = _


"=LOOKUP(""370302"",'[" & sFname & "]'!R2C2...

sFName is part of your string so Excel is putting it literally in the
formula. By concatenating sFName in the string, Excel will evaluate the
variable and put the actual name in the formula.

--
Dick Kusleika
MVP - Excel
Excel Blog - Daily Dose of Excel
www.dicks-blog.com