![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Join Date: Apr 2002
Posts: 54
|
Is there an easy way to select all cells in a workbook which are linked is one part of it.
In the same way is there a way to select all cells which contains formulas. |
|
|
|
|
|
#2 |
|
Join Date: Mar 2002
Posts: 6,680
|
[ This Message was edited by: TsTom on 2002-04-29 23:29 ] |
|
|
|
|
|
#3 |
|
Join Date: Mar 2002
Posts: 6,680
|
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 |
|
|
|
|
|
#4 |
|
Join Date: Apr 2002
Location: Midlands, UK
Posts: 217
|
Open the Go To window ( press F5 ) & select "Special". There are quite a few options there, including select all formulas.
|
|
|
|
|
|
#5 |
|
Join Date: Apr 2002
Posts: 363
|
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 ] |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|