Ark68
Well-known Member
- Joined
- Mar 23, 2004
- Messages
- 4,564
- Office Version
- 365
- 2016
- Platform
- Windows
I am struggling with the syntax of the code below:
I'm trying to carry over the variable 'sunfn' to the cell formula, but my attempts result in an "Application-defined or object-defined" error with the line in red.
Rich (BB code):
sunfn = "(" & cyr & ")Sunset.xlsx"
.Range("T1") = "=VLOOKUP(M1,'D:\WSOP 2020\SupportData\[' & sunfn & ']Sunset'!$A:$D,2,FALSE)"
.Range("U1") = "=VLOOKUP(M1,'D:\WSOP 2020\SupportData\[' & sunfn & ']Sunset'!$A:$D,3,FALSE)"
I'm trying to carry over the variable 'sunfn' to the cell formula, but my attempts result in an "Application-defined or object-defined" error with the line in red.