Solved

Using UNC or Relative Path references in Excel Workbook

Posted on 2014-11-04
3
764 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
[X]
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
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 50

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Unable to save Excel document because of errors 6 25
VB script help 23 36
Excel formula to append date to end of url 6 30
Color a cell based on a date in Excel 8 23
Over the years I have built up my own little library of code snippets that I refer to when programming or writing a script.  Many of these have come from the web or adaptations from snippets I find on the Web.  Periodically I add to them when I come…
This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

730 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