Consulting

Results 1 to 3 of 3

Thread: Solved: Clearcontents in a row

  1. #1

    Solved: Clearcontents in a row

    I know Range ("S11:65000").Clearcontents will clear the contents in the selected range. How do I clear only the used range in column S, starting at row 11?

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    [vba]

    Dim rng As Range
    With ActiveSheet

    On Error Resume Next
    Set rng = Intersect(.UsedRange, .Rows(11).Resize(.UsedRange.Rows.Count))
    On Error GoTo 0
    If Not rng Is Nothing Then rng.ClearContents
    End With
    [/vba]
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    Works great! Thank you xld

Posting Permissions

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