Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 127
Default Removing Links and Formulas

Excel 2003. I have workbooks in which there are internal links (cell
formulas and references to labeled cells in other sheets). I would like to
"freeze" these before programmatically copying these sheets to another
workbook. How can I resolve the internal links and formulas so that the
references and formulas are no longer there, only the actual values the
references or formulas produce? I need to do this programmatically. Thanks
for the help and God bless.

--
Dr. Doug Pruiett
Good News Jail & Prison Ministry
www.goodnewsjail.org
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 718
Default Removing Links and Formulas

Sub freezeFormulas()
Dim ws As Worksheet
Dim rngFormulas As Range
Dim rng As Range
For Each ws In Worksheets
On Error Resume Next
Set rngFormulas = ws.UsedRange.SpecialCells(xlCellTypeFormulas)
If Not rngFormulas Is Nothing Then
For Each rng In rngFormulas
rng.Value = rng.Value
Next rng
End If
Next ws
End Sub

HTH
--
AP

"Chaplain Doug" a écrit dans le
message de news: ...
Excel 2003. I have workbooks in which there are internal links (cell
formulas and references to labeled cells in other sheets). I would like
to
"freeze" these before programmatically copying these sheets to another
workbook. How can I resolve the internal links and formulas so that the
references and formulas are no longer there, only the actual values the
references or formulas produce? I need to do this programmatically.
Thanks
for the help and God bless.

--
Dr. Doug Pruiett
Good News Jail & Prison Ministry
www.goodnewsjail.org


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 127
Default Removing Links and Formulas

Thank you Ardus. From where do you write? Your name sounds Latvian.
--
Dr. Doug Pruiett
Good News Jail & Prison Ministry
www.goodnewsjail.org


"Ardus Petus" wrote:

Sub freezeFormulas()
Dim ws As Worksheet
Dim rngFormulas As Range
Dim rng As Range
For Each ws In Worksheets
On Error Resume Next
Set rngFormulas = ws.UsedRange.SpecialCells(xlCellTypeFormulas)
If Not rngFormulas Is Nothing Then
For Each rng In rngFormulas
rng.Value = rng.Value
Next rng
End If
Next ws
End Sub

HTH
--
AP

"Chaplain Doug" a écrit dans le
message de news: ...
Excel 2003. I have workbooks in which there are internal links (cell
formulas and references to labeled cells in other sheets). I would like
to
"freeze" these before programmatically copying these sheets to another
workbook. How can I resolve the internal links and formulas so that the
references and formulas are no longer there, only the actual values the
references or formulas produce? I need to do this programmatically.
Thanks
for the help and God bless.

--
Dr. Doug Pruiett
Good News Jail & Prison Ministry
www.goodnewsjail.org



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 718
Default Removing Links and Formulas

That's a nickname, after the place where I live (Ardus)

"Chaplain Doug" a écrit dans le
message de news: ...
Thank you Ardus. From where do you write? Your name sounds Latvian.
--
Dr. Doug Pruiett
Good News Jail & Prison Ministry
www.goodnewsjail.org


"Ardus Petus" wrote:

Sub freezeFormulas()
Dim ws As Worksheet
Dim rngFormulas As Range
Dim rng As Range
For Each ws In Worksheets
On Error Resume Next
Set rngFormulas = ws.UsedRange.SpecialCells(xlCellTypeFormulas)
If Not rngFormulas Is Nothing Then
For Each rng In rngFormulas
rng.Value = rng.Value
Next rng
End If
Next ws
End Sub

HTH
--
AP

"Chaplain Doug" a écrit dans le
message de news: ...
Excel 2003. I have workbooks in which there are internal links (cell
formulas and references to labeled cells in other sheets). I would
like
to
"freeze" these before programmatically copying these sheets to another
workbook. How can I resolve the internal links and formulas so that
the
references and formulas are no longer there, only the actual values the
references or formulas produce? I need to do this programmatically.
Thanks
for the help and God bless.

--
Dr. Doug Pruiett
Good News Jail & Prison Ministry
www.goodnewsjail.org





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
Removing Links Curtis Excel Worksheet Functions 3 November 4th 09 11:12 PM
Removing Links rothco Excel Programming 3 February 13th 06 02:07 PM
Removing links Dino Excel Worksheet Functions 2 October 5th 05 05:11 PM
removing values not links Jase Excel Programming 1 January 17th 05 05:41 AM
Removing links Jon Excel Programming 1 January 22nd 04 11:21 PM


All times are GMT +1. The time now is 06:47 AM.

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

About Us

"It's about Microsoft Excel"