Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Junior Member
 
Posts: 7
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,522
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Table_Array arg for VLOOKUP TMac71 Excel Worksheet Functions 1 May 20th 08 08:54 PM
vlookup table_array A Excel Discussion (Misc queries) 4 May 2nd 08 11:02 PM
Vlookup with function in table_array JoshuaEyer Excel Worksheet Functions 2 October 15th 05 03:49 PM
VLOOKUP TABLE_ARRAY veljo Excel Worksheet Functions 6 April 1st 05 12:28 AM
vlookup template -> table_array martinbr Excel Worksheet Functions 1 November 20th 04 04:53 PM


All times are GMT +1. The time now is 08:34 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"