I apologize for jumping the gun, skalavati...
As for your question...
What range of cells are we dealing with?
If it changes, what's the max?
Don't want to wait around for some code to spin through 16,777,216 cells...
Thanks,
Tom
This macro will select all cells on a worksheet that's linked.
Sub Select_Linked_Cells()
Dim Linked_Cells() As String
Dim Newrange As Range
On Error Resume Next
Cells.Find(What:=".xls]").Activate
First_Cell = ActiveCell.Address
Do Until Next_Cell = First_Cell
Cells.FindNext(After:=ActiveCell).Activate
Next_Cell = ActiveCell.Address
ReDim Preserve Linked_Cells(x)
Linked_Cells(x) = Next_Cell
x = x + 1
Loop
For x = LBound(Linked_Cells) To UBound(Linked_Cells)
If x = 0 Then
Set Newrange = Range(Linked_Cells(0))
Else
Set Newrange = Application.Union(Newrange, Range(Linked_Cells(x)))
End If
Next
Newrange.Select
End Sub
_________________
It's never too late to learn something new.
Ricky This message was edited by Ricky Morris on 2002-04-30 09:10
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.