Ark68
Well-known Member
- Joined
- Mar 23, 2004
- Messages
- 4,564
- Office Version
- 365
- 2016
- Platform
- Windows
I am having a mental block and I just can't seem to see the error with this code that is clearly messed up.
The workbook name is (2022) Sunset.xlsx
The Worksheet name is 'Sunset'
The range is Columns A:D
The formula that gets put into the cell is
Looking for a set of eyes to locate my error.
The workbook name is (2022) Sunset.xlsx
The Worksheet name is 'Sunset'
The range is Columns A:D
Code:
With myworksheet
cyr = Year(Now)
sunfn = "(" & cyr & ") Sunset.xlsx"
.Range("T1") = "=VLOOKUP(M1,'D:\WSOP 2020\SupportData\" & sunfn & "Sunset'!$A:$D,2,FALSE)"
End With
The formula that gets put into the cell is
Code:
=VLOOKUP(M1,'D:\WSOP 2020\SupportData\[(2022) Sunset.xlsxSunset](2022) Sunset'!$A:$D,2,FALSE)
Looking for a set of eyes to locate my error.