Solved

Using UNC or Relative Path references in Excel Workbook

Posted on 2014-11-04
3
576 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 48

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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
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…
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.

705 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now