Solved

Excel 2010 INDIRECT not working

Posted on 2013-01-03
9
891 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
  • 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
 
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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

Improved? Move/Copy Add-in Replacement - How to avoid the annoying, “A formula or sheet you want to move or copy contains the name XXX, which already exists on the destination worksheet.” David Miller (dlmille)  It was one of those days… I wa…
In this article we discuss how to recover the missing Outlook 2011 for Mac data like Emails and Contacts manually.
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 the scrolling table in Microsoft Excel using the INDEX function.

743 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now