Using Indirect to return results of a cell

tidnab312

New Member
Joined
Jun 23, 2011
Messages
10
I've created (with several variables) several cells that contain a full string of what should retrieve data from a different workbook however it's not working due to my lack of knowledge with INDIRECT and the &

so here's what i'm doing
cell value ='C:\test\[mytest.xlsx]worksheet name'!G20

if I input that data manually it returns the value (in this case a date)

Let's assume The cell that contains that string is A1

I've tried
=INDIRECT(A1)
result #REF or #Name (and the workbook IS open)

I'm wondering if I have to break down the 'path' [worksheet name] and !cell number and use something like this

=INDIRECT("'" & A1 & "'!" & B2) or something?

And to complicate things even more I'll need to append this

=IF(ISBLANK(INDIRECT(a1),"",INDIRECT(a1))
that's pretty self explanatory..

I'm lost :(

Thanks in Advance :biggrin:
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
If A1 houses

C:\test\[mytest.xlsx]worksheet name

then:

=INDIRECT("'"&A1&"'!G20")

should work if the target book is open.
 
Upvote 0
Still get the #REF! Error
if I evaluate it it says INDIRECT(""&"c:\test\test.xlsx]worksheet name'&"'!a1")

I had to change the value of the cell to not include the cell name and incorporate it as you showed above but am wondering if I can have the full string embedded in a cell...

But first things first... :(
 
Upvote 0
Woops looks like I missed a '
Thanks that worked,
Now I have to figure out how to make the G20 be pulled from a cell value(as the data changes)
and then
I'll work on embedding the =IF(ISBLANK

Thanks Again,
:>
 
Last edited:
Upvote 0
OK so I got the next piece working (pulling the cell number from the value of another cell.

NOW

I can't get the ISBLANK statement working... thinking it's just syntax or missing ) somewhere

=IF(ISBLANK(INDIRECT("'"&F24 &"'!"&G27),"",INDIRECT("'"&F24 &"'!"&G27))

I've learned a ton on this website and am slowly getting it:rolleyes:
 
Upvote 0
OK so I got the next piece working (pulling the cell number from the value of another cell.

NOW

I can't get the ISBLANK statement working... thinking it's just syntax or missing ) somewhere

=IF(ISBLANK(INDIRECT("'"&F24 &"'!"&G27),"",INDIRECT("'"&F24 &"'!"&G27))

I've learned a ton on this website and am slowly getting it:rolleyes:

Maybe you can work with:

If a number is expected...

=N(INDIRECT("'"&F24&"'!"&CELL("address",G27)))

If text is expected...

=T(INDIRECT("'"&F24&"'!"&CELL("address",G27)))
 
Upvote 0

Forum statistics

Threads
1,224,603
Messages
6,179,854
Members
452,948
Latest member
UsmanAli786

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top