Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

EXCEL: USING A CELL VALUE TO REFERENCE A WORKBOOK IN A FORMULA

Posted on 2011-09-19
2
Medium Priority
?
270 Views
Last Modified: 2012-05-12
Hi,

I have the following formula which perform a Vlookup in a workbook located in a different file:

=VLOOKUP(A3,'C:\Users\Roberto\Desktop\TEST\[TEST1.xls]Sheet1'!$A:$C,2,FALSE)

I would like that the name of the workbook [TEST1.xls] comes form Cell B2... so if I change the value there the Formula will link to a different Workbook...

It's that possible ?

Thank you in advance for your help,
Roberto.
0
Comment
Question by:Pabilio
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 50

Accepted Solution

by:
Ingeborg Hawighorst (Microsoft MVP / EE MVE) earned 2000 total points
ID: 36563666
Hello,

you could use

=VLOOKUP(A3,INDIRECT("'"&B2&"Sheet1'!$A:$C"),2,FALSE)

but Indirect() will only work when the other file is open. A free add-in called Morefunc has a function called Indirect.Ext which also works with closed workbooks. You can download the add-in here: http://download.cnet.com/Morefunc/3000-2077_4-10423159.html

cheers, teylyn
0
 
LVL 5

Author Closing Comment

by:Pabilio
ID: 36588940
Hi Teylyn!...

I totally forgot to close this question ... Sorry for the delay.

I tried the Indirect.Ext and it does the trick.

Thank you for your help.

Regards,
Roberto.
0

Featured Post

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
If you need to forecast numbers -- typically for finance -- the Windows and Mac versions of Excel 2016 have a basket of tools to get the job done.
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

670 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question