Thanks Thanks:  0
Likes Likes:  0
Results 1 to 5 of 5

Thread: selecting cells which are only linked or only cells with for

  1. #1
    Board Regular
    Join Date
    Apr 2002
    Posts
    57
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    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. #2
    Board Regular
    Join Date
    Mar 2002
    Location
    Cincinnati, Ohio, USA
    Posts
    6,824
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default



    [ This Message was edited by: TsTom on 2002-04-29 23:29 ]

  3. #3
    Board Regular
    Join Date
    Mar 2002
    Location
    Cincinnati, Ohio, USA
    Posts
    6,824
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    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. #4
    Board Regular
    Join Date
    Apr 2002
    Location
    Midlands, UK
    Posts
    217
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Open the Go To window ( press F5 ) & select "Special". There are quite a few options there, including select all formulas.

  5. #5
    Board Regular
    Join Date
    Mar 2002
    Posts
    363
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    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 ]

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •