Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5
Default using text from cell in lookup formula

I have created a master sheet using a vlookup to get data from another excel
file but everytime I have to change the formulas to correct the file name to
the corrosponding file.
example: "=VLOOKUP($A2,'[3069.xls]resource plan'!$A$2:$BI$36,10,FALSE)"
I am trying to use text in cell a1 as a variable for file name ("3069.xls")
so I only change it once.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 793
Default using text from cell in lookup formula

In your VLOOKUP formula replace '[3069.xls]resource plan'!$A$2:$BI$36
with
=INDIRECT("'[" & A1 & ".xls]resource plan'!$A$2:$BI$36")

assuming A1 has 3069

Basically construct a string which results in '[3069.xls]resource
plan'!$A$2:$BI$36 and use INDIRECT() around it...

"djames2007" wrote:

I have created a master sheet using a vlookup to get data from another excel
file but everytime I have to change the formulas to correct the file name to
the corrosponding file.
example: "=VLOOKUP($A2,'[3069.xls]resource plan'!$A$2:$BI$36,10,FALSE)"
I am trying to use text in cell a1 as a variable for file name ("3069.xls")
so I only change it once.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5
Default using text from cell in lookup formula

thank you it works with the following
=VLOOKUP($A2,INDIRECT("'[" & A1 & ".xls]resource plan'!$A$2:$BI$36"),10,FALSE)

"Sheeloo" wrote:

In your VLOOKUP formula replace '[3069.xls]resource plan'!$A$2:$BI$36
with
=INDIRECT("'[" & A1 & ".xls]resource plan'!$A$2:$BI$36")

assuming A1 has 3069

Basically construct a string which results in '[3069.xls]resource
plan'!$A$2:$BI$36 and use INDIRECT() around it...

"djames2007" wrote:

I have created a master sheet using a vlookup to get data from another excel
file but everytime I have to change the formulas to correct the file name to
the corrosponding file.
example: "=VLOOKUP($A2,'[3069.xls]resource plan'!$A$2:$BI$36,10,FALSE)"
I am trying to use text in cell a1 as a variable for file name ("3069.xls")
so I only change it once.

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
use cell text in lookup function rsmith Excel Worksheet Functions 3 May 21st 08 06:37 PM
Lookup text then copy over to new cell Jaco Jacobs Excel Worksheet Functions 3 September 26th 06 04:52 PM
Referencing cell text in a lookup Rich Excel Discussion (Misc queries) 4 September 20th 06 08:29 PM
Lookup certain text within a cell, PLEASE HELP! [email protected] Excel Worksheet Functions 3 August 9th 06 03:54 PM
lookup a text cell and return text Cristi R Excel Discussion (Misc queries) 4 August 2nd 06 02:41 PM


All times are GMT +1. The time now is 12:41 AM.

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"