Solved

Using UNC or Relative Path references in Excel Workbook

Posted on 2014-11-04
3
680 Views
Last Modified: 2014-11-17
We currently have 16 individual workbooks that we have 16 individuals tracking data in.

We have created a single Consolidated Excel File to bring all of the data together from the other workbooks.

The Workbooks are stored in a folder on the server on a Drive which is labeled Q:.

Each of the cells on the Consolidated Workbook have a reference to a cell on the individual workbooks.  The cell reference looks like this:
=IF('Q:\Corp\[ExcelFile.xls]Worksheet'!C5="","",'Q:\Corp\[ExcelFile.xls]Worksheet'!C5)

If the files are moved or if the user's computer does not map the drive where the files are located as the Q:Drive, then the values are not displayed on the Consolidated File.

We have written a Macro which also opens up all of the individual files, because the references to the files do not work on closed notebooks.

We would like to try to use a relative path in the references so that the files can be placed anywhere as long as all of the files are kept together.

Thoughts on the best way to change the references?
0
Comment
Question by:btgtech
3 Comments
 
LVL 49

Expert Comment

by:Rgonzo1971
ID: 40423627
Hi,

why not simply use Home / Editing / Find and replace

Find what: Q:\
Replace with : \\yourUNCpath\

Regards
0
 
LVL 49

Expert Comment

by:Gustav Brock
ID: 40423629
Logged on to the network, you should be able to control the correct mapping of drive Q:.

If you don't have a logon script, you can create a batch file that can be run from a shortcut:

net use q: /d
net use q: \\yourserver\yourpath

On the laptops when running off the network, you have a local folder with copies of the attached workbooks in a subfolder "Corp".

/gustav

Then run this command:

subst q: c:\yourlocalfolder
0
 
LVL 17

Accepted Solution

by:
aflockhart earned 500 total points
ID: 40423645
If you store the Consolidated Workbook in the same folder as the source files,it should handle the links as if they were 'relative' paths - even though you see the full path in the formula in Excel, it changes if you move all the files (including the consolidated file)  to a new location, or access them with a different drive mapping.

I think this also works if the source files are in a subdirectory below the consolidated file - it can still track the files being moved, as long as the consolidated file and the subfolder are moved together,

If you want, you can also edit the link formulas to contain a UNC path:

='\\myservername\folder\[source1.xlsx]Sheet1'!$A$2
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question (http:/Q_27311462.html), I created an alternative function to the Excel Concatenate() function that you might find useful.  I tested several solutions and share the results in this article as well as t…
Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question