m=0
Set fRange = Range("B2:J2")
For Each Cell In fRange
fPath = Cell.Value
fName = Cell.Offset(1, 0).Value
Application.Workbooks.Open (fPath)
Sheets("database").Select
Cells(m, 2).Select
ActiveCell.FormulaR1C1 = _
"=VLOOKUP(RC[-1],[fName]compilation!$H$2:$P$47,2,FALSE)"
m=m+1
Next Cell
(Normal text) This is my code.I got issue with how i can use the file name as a variable in the vlookup formula. fName used like this give me somme error of syntax. Thanks in advance for any help !