Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 6 of 6

Thread: maybe simple question. special cells (unlocked cells)

  1. #1
    Board Regular
    Join Date
    Feb 2002
    Location
    Singapore
    Posts
    77
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Could you tell me how to use Range(aRange).SpecialCells Method to select the unlocked cells in range aRange.
    Thx

  2. #2
    MrExcel MVP
    Join Date
    Feb 2002
    Location
    Bogota, Colombia
    Posts
    11,959
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    First, the sheet must be unprotected.
    Then, record a macro to get the correct syntax. Replace the recorded range with aRange
    Regards,

    Juan Pablo González
    http://www.juanpg.com

  3. #3
    Board Regular
    Join Date
    Feb 2002
    Location
    Singapore
    Posts
    77
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Sorry, i didn't get you. (
    But how can i record Macro to select special cells whose locked property is false ? The Macro will only return the exact cells "B1, C2, "... But not SpecialCells...

  4. #4
    MrExcel MVP Ivan F Moala's Avatar
    Join Date
    Feb 2002
    Location
    Auckland, New Zealand
    Posts
    4,209
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    On 2002-03-21 20:11, Andrew XJ wrote:
    Sorry, i didn't get you. (
    But how can i record Macro to select special cells whose locked property is false ? The Macro will only return the exact cells "B1, C2, "... But not SpecialCells...
    Do what Juan suggested....however the locked
    property of a cell is not avail via specialcells....so you will have to loop
    through the range object and test for locked

    eg

    Dim Rg As Range
    Dim oCell As Range

    Set Rg = Range("A1:B11")
    For Each oCell In Rg
    If oCell.Locked = False Then
    MsgBox oCell.Address 'do your thing
    End If
    Next


    Ivan

  5. #5
    Board Regular
    Join Date
    Feb 2002
    Location
    Singapore
    Posts
    77
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    (, so i have no choice but to use slow for loop again. Thank you two anyway!.

  6. #6
    Board Regular
    Join Date
    Feb 2002
    Location
    Singapore
    Posts
    77
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    (, so i have no choice but to use slow for loop again. Thank you two anyway!.

    regards
    Andrew XJ

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
  •