using Indirect() to reference value in another sheet

sbmvr

New Member
Joined
Sep 9, 2008
Messages
3
I am trying to utilize paramemeters in the Indirect() function to look up values in another Excel file which is located every month in another folder reflecting that month, eg "\2011\May2011\". The file name is the same, the path differs from month-to-month. The problem is, when I have assembled the string properly using a serios of Indirect() functions, the value that I need to be picked up from that other Excel file is not retrieved.

So I have in a cell:
= "=' " & INDIRECT("$AC$5") & INDIRECT("$AC$4") & INDIRECT("$AC$6")

that produces the string I need:
='J:\IPB_Finance\GHQ Supplementary Data\2011\May2011\[GPB HMUS Insur.xls]GPB HMUS INSUR'!$Q$7

but I need the numeric value referenced by that string! And that's what I would like you to please comment on.

Thank you all.
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
Try:

=Sum(indirect("=' " & INDIRECT("$AC$5") & INDIRECT("$AC$4") & INDIRECT("$AC$6"))

or if you don't want sum, what ever you want.

basically, put another indirect around it when putting it in a function.
 
Upvote 0
I am trying to utilize paramemeters in the Indirect() function to look up values in another Excel file which is located every month in another folder reflecting that month, eg "\2011\May2011\". The file name is the same, the path differs from month-to-month. The problem is, when I have assembled the string properly using a serios of Indirect() functions, the value that I need to be picked up from that other Excel file is not retrieved.

So I have in a cell:
= "=' " & INDIRECT("$AC$5") & INDIRECT("$AC$4") & INDIRECT("$AC$6")

that produces the string I need:
='J:\IPB_Finance\GHQ Supplementary Data\2011\May2011\[GPB HMUS Insur.xls]GPB HMUS INSUR'!$Q$7

but I need the numeric value referenced by that string! And that's what I would like you to please comment on.

Thank you all.
The source file MUST be open for INDIRECT to work.

This is usually not desireable especially if there are many files being linked to.
 
Upvote 0
Try:

=Sum(indirect("=' " & INDIRECT("$AC$5") & INDIRECT("$AC$4") & INDIRECT("$AC$6"))

or if you don't want sum, what ever you want.

basically, put another indirect around it when putting it in a function.

thank you. Assuming that the referenced worksheet is open, using
=SUM(INDIRECT("=' " & INDIRECT("$AC$5") & INDIRECT("$AC$4") & INDIRECT("$AC$6")))
produces #REF! error
 
Upvote 0

Forum statistics

Threads
1,220,965
Messages
6,157,119
Members
451,399
Latest member
alchavar

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