Hi Everyone
I was wondering whether someone can help me with a VB code.
I am trying to write a code to look at the workbook in a directory based on the week number.
I cell H1 I have the week number.
What I need a code to vlookup a external workbook based on the week number.
The external workbooks are named as follows:
Sales Week 5
Sales Week 6
Sales Week 7
.
.
.
Sales Week 13
These workbooks are kept in C:\workbooks directory and are all xls files
so what I need is the code to do following:
vlookup(a1,c:\workbooks\Sales Week ?.xls,2,0)
where ? will be replace by the value in cell H1 i.e. if H1=6 then it will vlookup a1 from c:\workbooks\sales Week 6.xls.
Any help with this code is much appreciate it
Bookmarks