break links selected cells VBA

samidodger

New Member
Joined
Sep 14, 2010
Messages
13
Hi there,

in my workbook I have in sheet1 in selected cells links to a file called M11 PMO.xlsx. In sheet2 I also have selected cells (as in P6, P9, P12 and so on) with links to the same file. These are just links no formula in them.

I could go to Data edit links, but that would valuerise the links in sheet one.I could copy and past values, in sheet 2 but this doesnt work on multiple cells. Is there a way through VBA or any other way to break the links in just sheet 2, on just those cells (P6, p9, p12 and so on) and convert the data to values?

Also how would the code change if the cells were random?

using Excel 2007

Long query but at least its challenging. :)
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
You can convert them to values, but this will overwrite any formulae in your selection to values...

Code:
Sub Paste_Value()

Dim r As Range

For Each r In Selection
    r.Formula = r.Value
Next r

End Sub
 
Upvote 0

Forum statistics

Threads
1,214,919
Messages
6,122,259
Members
449,075
Latest member
staticfluids

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top