Excel formula Question

willwill

New Member
Joined
Oct 31, 2002
Messages
4
Hi all!

I was trying to display some .xls data by provide a cell for filename input.

Ex. input filename in cell A5, formula will use A5 as filename =[A5]sheet1!a2. <-doesnt work....

Any expert know any ways to do this??
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.

DonkeyOte

MrExcel MVP
Joined
Sep 6, 2002
Messages
9,123
On 2002-11-01 02:21, willwill wrote:
Hi all!

I was trying to display some .xls data by provide a cell for filename input.

Ex. input filename in cell A5, formula will use A5 as filename =[A5]sheet1!a2. <-doesnt work....

Any expert know any ways to do this??

Almost there willwill

=INDIRECT("["A5&"]Sheet1!A2")

where A5 = Book1.xls etc

Excel reads as =[Book1.xls]Sheet1!A2
 

DonkeyOte

MrExcel MVP
Joined
Sep 6, 2002
Messages
9,123
OK well you can amend to:

=INDIRECT("'C:MrExcelNov01["&A5&"]Sheet1'!A1")

Does that work....(obviously amending the file path...(you may get an error as a file may be in a different folder so probably best to use full string at all times).

Soz
Luke
 

Forum statistics

Threads
1,143,707
Messages
5,720,386
Members
422,282
Latest member
psunith

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
Top