ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Selecting a filepath based on cell contents (https://www.excelbanter.com/excel-discussion-misc-queries/32459-selecting-filepath-based-cell-contents.html)

ceemo

Selecting a filepath based on cell contents
 

ok ill try and explain this as easily as i can.

I export a csv daily (1-Borrowed Hours ddmm.csv) ddmm would be the date
and month

I keep this folder in a similar filepath to the below

g:\folder1\folder2ddmm\1-borrowed Hours ddmm.csv

I have another spreadsheet that links to this spreadhseet for example
lets say cell A1 on my new book links to cell A1 on the saved csv
file.

i would like to place a date in cell c1 and month d1 in my new book and
the filepath change to the required new csv. I realise that if the path
does not exist then this will cause an error.

I tried using the concatenate function with no joy and im not even sure
if this can be done, possibly using VB im not sure.

Can anyone help?


--
ceemo
------------------------------------------------------------------------
ceemo's Profile: http://www.excelforum.com/member.php...o&userid=10650
View this thread: http://www.excelforum.com/showthread...hreadid=382189


Damon Longworth

You will have trouble with this task as described. Indirect is the closest
function, but it does not work with closed files.

I personally avoid external links. I will add a sheet, then copy the
external data into this new sheet. Now my links can be created to internal
data. There is a macro inside the file to update this data sheet with the
newly exported data.

--
Damon Longworth

Don't miss out on the 2005 Excel User Conference
Sept 16th and 17th
Stockyards Hotel - Ft. Worth, Texas
www.ExcelUserConference.com


"ceemo" wrote in
message ...

ok ill try and explain this as easily as i can.

I export a csv daily (1-Borrowed Hours ddmm.csv) ddmm would be the date
and month

I keep this folder in a similar filepath to the below

g:\folder1\folder2ddmm\1-borrowed Hours ddmm.csv

I have another spreadsheet that links to this spreadhseet for example
lets say cell A1 on my new book links to cell A1 on the saved csv
file.

i would like to place a date in cell c1 and month d1 in my new book and
the filepath change to the required new csv. I realise that if the path
does not exist then this will cause an error.

I tried using the concatenate function with no joy and im not even sure
if this can be done, possibly using VB im not sure.

Can anyone help?


--
ceemo
------------------------------------------------------------------------
ceemo's Profile:
http://www.excelforum.com/member.php...o&userid=10650
View this thread: http://www.excelforum.com/showthread...hreadid=382189





All times are GMT +1. The time now is 02:58 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com