Hi,
I'm working on a project where I need to populate a column with vlookups taken from different workbooks, I have for the most part got it working.
However currently, everytime it populates a cell it prompts the user to select the sheet from the workbook as there are two. The sheet name is always the same so I tried to add it into the code so it would avoid having to repeatedly click okay while it populated the table.
This is where I'm struggling.
This is the original code where it asks for the user to select the sheet every time.
This is what is produced when it is run and the user selects the worksheet each time (which works perfectly fine):
I tried to enter the Full Costs sheet name into the code like so:
However this produces the following:
The issue I have found is that the square brackets that are around the filename are generated automatically, they aren’t in the actual filename and I haven’t put them in, so I am struggling to work out how to add the sheet name in where it wont be included within the square brackets, as that is what's breaking the lookup.
What am I doing wrong? Any ideas?
Thanks,
Matt.
Bookmarks