?
Solved

Excel 2010 INDIRECT not working

Posted on 2013-01-03
9
Medium Priority
?
1,025 Views
Last Modified: 2013-01-03
Please help, I cannot seem to get the INDIRECT formula to work...

I currently have:
=INDIRECT("'["&INDIRECT("A1")&".xlsx]"&INDIRECT("A2")&"'!"&INDIRECT("A3"))

The value in A1 is     C:\Users\me\Desktop\test-variable values
The value in A2 is     test-variable values
The value in A3 is     w1

The file being references is open, but I just get #REF!

Thank you, if you can help!!!
0
Comment
Question by:BEBaldauf
[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
  • 4
  • 3
  • 2
9 Comments
 
LVL 13

Expert Comment

by:Shanan212
ID: 38740873
="["&INDIRECT("A1")&".xlsx]"&INDIRECT("A2")&"'!"&INDIRECT("A3")

Open in new window


Try above

What are you trying to do?
0
 
LVL 50

Expert Comment

by:barry houdini
ID: 38740877
You should only need a single INDIRECT function and you don't use quotes around the cell references, i.e.

=INDIRECT("'["&A1&".xlsx]"&A2&"'!"&A3)

regards, barry
0
 

Author Comment

by:BEBaldauf
ID: 38740901
I'm trying to simply get the contents of cell W1 out of the workbook being referenced.  (first step in a process)

Neither suggestion worked.
Shanan212,  your formula returned the string:   [C:\Users\bbaldauf\Desktop\test-variable values.xlsx]test-variable values'!w1
Barry, your formula returned #REF!

Any other suggestions?
0
Office 365 Training for IT Pros

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

 
LVL 13

Expert Comment

by:Shanan212
ID: 38740963
=INDIRECT("'"&INDIRECT("A1")&"["&INDIRECT("A2")&".xlsx]"&INDIRECT("A3")&"'!"&INDIRECT("A4"))

Open in new window


This works as long as workbook is open
0
 

Author Comment

by:BEBaldauf
ID: 38740973
Still getting #REF!
0
 
LVL 13

Accepted Solution

by:
Shanan212 earned 2000 total points
ID: 38740974
=INDIRECT("'"&INDIRECT("A1")&"["&INDIRECT("A2")&".xlsx]"&INDIRECT("A3")&"'!"&INDIRECT("A4"))

Open in new window


This works as long as workbook is open. Below are values from A1 - A4
A1 - path
A2 - file name
A3 - sheet name
A4 - cell

C:\Users\me\Desktop\test-variable values\
test-variable values
test-variable values
W1
0
 

Author Comment

by:BEBaldauf
ID: 38740981
HEY!  You're awesome!  That did it!
MUCH APPRECIATED!
0
 
LVL 50

Expert Comment

by:barry houdini
ID: 38740983
The best way to do this is for you to do this is probably to work out what the whole reference should be. Open the source file, and then in the formula worksheet type = in a cell then select the cell you need from the source workbook - that will give you the reference. You can then build that path with INDIRECT function

Do you know the required reference - if the file is open I doubt you need the whole path?

regards, barry
0
 

Author Closing Comment

by:BEBaldauf
ID: 38740987
SUPER AWESOME, PATIENT, FAST, PERFECT!!!!!
0

Featured Post

Office 365 Training for Admins - 7 Day Trial

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

Question has a verified solution.

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

My attempt to use PowerShell and other great resources found online to simplify the deployment of Office 365 ProPlus client components to any workstation that needs it, regardless of existing Office components that may be needing attention.
New style of hardware planning for Microsoft Exchange server.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

770 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