Solved

Excel 2010 INDIRECT not working

Posted on 2013-01-03
9
975 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
Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

 
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 500 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 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.

Question has a verified solution.

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

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
This article describes a serious pitfall that can happen when deleting shapes using VBA.
Learn how to create and modify your own paragraph styles in Microsoft Word. This can be helpful when wanting to make consistently referenced styles throughout a document or template.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

728 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