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

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.

njimack

Well-known Member
Joined
Jun 17, 2005
Messages
7,764
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
 

Watch MrExcel Video

Forum statistics

Threads
1,129,580
Messages
5,637,211
Members
416,961
Latest member
sigrid6940

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