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

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.

njimack

Well-known Member
Joined
Jun 17, 2005
Messages
7,772
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
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,164,637
Messages
5,838,496
Members
430,551
Latest member
digitalbrolly

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
Top