copy the content variable in the formula

maikeyjohn

Board Regular
Joined
Oct 7, 2013
Messages
66
AB
1AAPLMSFT
2='C:\Documents and Settings\SASTC\My Documents\Stock Data\[AAPL.csv]AAPL'!E2='C:\Documents and Settings\SASTC\My Documents\Stock Data\[MSFT.csv]MSFT'!E2

<tbody>
</tbody>

how should i COPY automatically "XYL" written as in formula (XYL.csv and XYL') comprehending with the top bar?

Tried "&C1&" but it`s not working.:oops:
 
What formula do you get, if you open the source CSV file, use a manual approach to get the cell value (*) and then close the source CSV file again.

(*) in the cell containing the formula, typ:

=

and point to the source cell and hit Enter.
 
Upvote 0

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
='AAPL.csv'!E2
='MSFT.csv'!E2
OTHERWISE WITH MY XYL STOCK IT SHOWS FORMULA ITSELF
='C:\Documents and Settings\SASTC\My Documents\Stock Data\["&C1&".csv]"&C1&"'!E2
 
Upvote 0
Can you wrap the INDIRECT function around the string above (and leave the source file opened)?
 
Upvote 0
for the =INDIRECT(...) ERROR IS #REF!
for the =INDIRECT.EXT(....) ERROR IS #VALUE! ----> USING Morefunc Addin
both by keeping the source file open !!!
 
Upvote 0
The INDIRECT function needs a text argument: did you use " " around the argument within the INDIRECT function ?
 
Upvote 0
both tried as
=INDIRECT('C:\Documents and Settings\SASTC\My Documents\Stock Data\["&C1&".csv]"&C1&"'!$E2) and
=INDIRECT("'C:\Documents and Settings\SASTC\My Documents\Stock Data\["&C1&".csv]"&C1&"'!$E2")
 
Upvote 0
The second formula works for me, on a dummy Book1.csv file and worksheet Book1.
The source file Book1.csv is opened to make it work.
 
Upvote 0

Forum statistics

Threads
1,215,282
Messages
6,124,052
Members
449,139
Latest member
sramesh1024

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