Home |
Search |
Today's Posts |
#1
|
|||
|
|||
adding vlookup into Macro and table_array is different every week.
Hi
I have a weekly report where I need to update column M,N,O,P Row 1 is header. M2 =VLOOKUP(F2,'[File1 2012-0201.xls]sheet1'!$A:$B,2,0) N2 =VLOOKUP(F2,'[File2 2012-0201.xls]sheet1'!$A:$U,21,0) O2 =VLOOKUP(D2,'[File3 2012-0201.xls]sheet1'!$D:$O,12,0) P2 =VLOOKUP(D2,'[File4 2012-0201.xls]sheet1'!$D:$P,13,0) and File1 2012-0201xls will become File1 2012-0208.xls next week. same as file 2,3 & 4. only Table_Array is different every week, rest of the formula is the same. How do I add this into my macro where it will pause and ask me for the file location & Name (Table_Array) when I run it? Thank you. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
adding vlookup into Macro and table_array is different every week.
On Feb 1, 5:56*pm, cupertino
wrote: Hi I have a weekly report where I need to update column M,N,O,P Row 1 is header. M2 =VLOOKUP(F2,'[File1 2012-0201.xls]sheet1'!$A:$B,2,0) N2 =VLOOKUP(F2,'[File2 2012-0201.xls]sheet1'!$A:$U,21,0) O2 =VLOOKUP(D2,'[File3 2012-0201.xls]sheet1'!$D:$O,12,0) P2 =VLOOKUP(D2,'[File4 2012-0201.xls]sheet1'!$D:$P,13,0) and File1 2012-0201xls will become File1 2012-0208.xls next week. same as file 2,3 & 4. only Table_Array is different every week, rest of the formula is the same. How do I add this into my macro where it will pause and ask me for the file location & Name (Table_Array) when I run it? Thank you. -- cupertino Record a macro after either selecting or referring to all and then use editreplacereplace the old with the new. If you still can't get it, send me your file dguillett1 @gmail.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Table_Array arg for VLOOKUP | Excel Worksheet Functions | |||
vlookup table_array | Excel Discussion (Misc queries) | |||
Vlookup with function in table_array | Excel Worksheet Functions | |||
VLOOKUP TABLE_ARRAY | Excel Worksheet Functions | |||
vlookup template -> table_array | Excel Worksheet Functions |