Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Using UNC or Relative Path references in Excel Workbook

Posted on 2014-11-04
3
737 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 50

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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Workbook link problems after copying tabs to a new workbook? David Miller (dlmille) Intro Have you either copied sheets to a new workbook, and after having saved and opened that workbook, you find that there are links back to the original sou…
With User Account Control (UAC) enabled in Windows 7, one needs to open an elevated Command Prompt in order to run scripts under administrative privileges. Although the elevated Command Prompt accomplishes the task, the question How to run as script…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.

839 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