Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
job job is offline
external usenet poster
 
Posts: 65
Default Internal links

Anyone written anything that will find all Internal links and paste special
values? Because an internal link can be =C2 or =Sheet1!C2 I see you could
look for the "!", but what about the other link =C2?

Cheers,

Job


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default Internal links

Job,

Do you consider a formula like:

=SUM(A1:A3)

an internal link?

Would converting all formulas to values work, or do you need to still have formulas work?

HTH,
Bernie
MS Excel MVP


"Job" wrote in message ...
Anyone written anything that will find all Internal links and paste special values? Because an
internal link can be =C2 or =Sheet1!C2 I see you could look for the "!", but what about the other
link =C2?

Cheers,

Job



  #3   Report Post  
Posted to microsoft.public.excel.programming
job job is offline
external usenet poster
 
Posts: 65
Default Internal links

That's the problem, I still need all formulas. I only need to paste the
values where it's an actual link as mentiond before. Any sums or averages
max min etc should be left alone.
"Bernie Deitrick" <deitbe @ consumer dot org wrote in message
...
Job,

Do you consider a formula like:

=SUM(A1:A3)

an internal link?

Would converting all formulas to values work, or do you need to still have
formulas work?

HTH,
Bernie
MS Excel MVP


"Job" wrote in message
...
Anyone written anything that will find all Internal links and paste
special values? Because an internal link can be =C2 or =Sheet1!C2 I see
you could look for the "!", but what about the other link =C2?

Cheers,

Job





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default Internal links

Job,

Try the macro below on a copy of a sheet - as written, it will only operate on the activesheet, but
it would be easy to loop through all sheets.

Run the macro, and if any formulas come up in the msgbox that should have stayed formulas, post
back. For longer term use, remove the msgbox lines.

HTH,
Bernie
MS Excel MVP

Sub RemoveLinksFromCellsButNotFormulas2()
Dim myCell As Range
Dim myAddress As String
Dim myLink As Range

For Each myCell In ActiveSheet.Cells. _
SpecialCells(xlCellTypeFormulas)
myAddress = Replace(myCell.Formula, "=", "")
On Error GoTo NotLink
Set myLink = Range(myAddress)
MsgBox "Removing link " & myCell.Formula & _
" from cell " & myCell.Address
myCell.Value = myCell.Value

NotLink:
Resume Done1
Done1:
Next
End Sub



"Job" wrote in message ...
That's the problem, I still need all formulas. I only need to paste the values where it's an
actual link as mentiond before. Any sums or averages max min etc should be left alone.
"Bernie Deitrick" <deitbe @ consumer dot org wrote in message
...
Job,

Do you consider a formula like:

=SUM(A1:A3)

an internal link?

Would converting all formulas to values work, or do you need to still have formulas work?

HTH,
Bernie
MS Excel MVP


"Job" wrote in message ...
Anyone written anything that will find all Internal links and paste special values? Because an
internal link can be =C2 or =Sheet1!C2 I see you could look for the "!", but what about the
other link =C2?

Cheers,

Job







  #5   Report Post  
Posted to microsoft.public.excel.programming
job job is offline
external usenet poster
 
Posts: 65
Default Internal links

Hey Bernie,

Thanks this works great!

Job

"Bernie Deitrick" <deitbe @ consumer dot org wrote in message
...
Job,

Try the macro below on a copy of a sheet - as written, it will only
operate on the activesheet, but it would be easy to loop through all
sheets.

Run the macro, and if any formulas come up in the msgbox that should have
stayed formulas, post back. For longer term use, remove the msgbox lines.

HTH,
Bernie
MS Excel MVP

Sub RemoveLinksFromCellsButNotFormulas2()
Dim myCell As Range
Dim myAddress As String
Dim myLink As Range

For Each myCell In ActiveSheet.Cells. _
SpecialCells(xlCellTypeFormulas)
myAddress = Replace(myCell.Formula, "=", "")
On Error GoTo NotLink
Set myLink = Range(myAddress)
MsgBox "Removing link " & myCell.Formula & _
" from cell " & myCell.Address
myCell.Value = myCell.Value

NotLink:
Resume Done1
Done1:
Next
End Sub



"Job" wrote in message
...
That's the problem, I still need all formulas. I only need to paste the
values where it's an actual link as mentiond before. Any sums or
averages max min etc should be left alone.
"Bernie Deitrick" <deitbe @ consumer dot org wrote in message
...
Job,

Do you consider a formula like:

=SUM(A1:A3)

an internal link?

Would converting all formulas to values work, or do you need to still
have formulas work?

HTH,
Bernie
MS Excel MVP


"Job" wrote in message
...
Anyone written anything that will find all Internal links and paste
special values? Because an internal link can be =C2 or =Sheet1!C2 I
see you could look for the "!", but what about the other link =C2?

Cheers,

Job









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
finding internal links in excel directory Mominator Excel Discussion (Misc queries) 0 September 13th 07 02:56 AM
find internal links in mutliple spreadsheets? Mominator Excel Discussion (Misc queries) 0 September 8th 07 04:08 PM
Break internal links doublew Excel Discussion (Misc queries) 3 May 2nd 07 04:42 PM
Internal Links Sean Excel Discussion (Misc queries) 2 February 6th 07 12:12 PM
Internal links not working... [email protected] Excel Discussion (Misc queries) 3 December 29th 06 07:27 PM


All times are GMT +1. The time now is 06:14 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"