Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Simon Westenra
 
Posts: n/a
Default Changing bulk Link references to different workbook.

We have an excel spreadsheet that has a lot (thousands) of links to data on
an excel spreadsheet on the C: drive.
e.g.
='C:\My Documents\Excel\data\[SourceData.xls]Sheet1'!$B$3

We are moving to Citrix, and Losing our C: drives, so I need to update all
references in all 16 worksheets from "C:\My Documents" to "H:\Working"

Is there a bulk method of doing this?

Thanx in Advance
Simon Westenra
Health Intelligence
Wellington, New Zealand.
  #2   Report Post  
Simon Westenra
 
Posts: n/a
Default

Replying to my own post - tut tut!

Anyway I have tried altering some samples I found, and this appears to work.
It's not too fast, but I can live with this.

Sub RemapRefs()
Dim ws As Worksheet
Dim cell As Range
Dim Val1 As String
Dim Val2 As String

Val1 = "F:\[Excel_Reference_Test3.xls]"
Val2 = "F:\[Excel_Reference_Test2.xls]"
For Each ws In ActiveWorkbook.Worksheets
ws.Select
Cells.Select
For Each cell In Selection
If cell.HasFormula Then
cell.Formula = Replace(cell.Formula, Val1, Val2)
End If
Next ' Cell
Next 'Sheet
End Sub

Cheers
"Simon Westenra" wrote:

We have an excel spreadsheet that has a lot (thousands) of links to data on
an excel spreadsheet on the C: drive.
e.g.
='C:\My Documents\Excel\data\[SourceData.xls]Sheet1'!$B$3

We are moving to Citrix, and Losing our C: drives, so I need to update all
references in all 16 worksheets from "C:\My Documents" to "H:\Working"

Is there a bulk method of doing this?

Thanx in Advance
Simon Westenra
Health Intelligence
Wellington, New Zealand.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Remove link to another workbook George Gee New Users to Excel 6 January 9th 05 11:24 PM
Changing cell references Tracey Excel Discussion (Misc queries) 4 January 4th 05 08:05 PM
how can i link sheets in my excel workbook new secretary Excel Worksheet Functions 1 December 31st 04 10:08 PM
Can't link cells in worksheets in same workbook Hume Waring New Users to Excel 1 December 22nd 04 09:13 PM
How do I link sorted data to other workbook sheets? Cori Excel Worksheet Functions 1 December 10th 04 05:00 PM


All times are GMT +1. The time now is 01:33 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"