• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

How to clear the cells only from the table

Belleke

Well-Known Member
Do you mean this?
Code:
Sub CleanCells()
With Sheets("Plan1").ListObjects("Tabela1")
    If Not .DataBodyRange Is Nothing Then .DataBodyRange.ClearContents
End With
End Sub
 

Belleke

Well-Known Member
Hi,
Like this?
Code:
Sub CleanCells()
For i = 3 To 17
    Sheets("Plan1").ListObjects("Tabela1").ListColumns(i).DataBodyRange.ClearContents
Next i
For i = 24 To 28
    Sheets("Plan1").ListObjects("Tabela1").ListColumns(i).DataBodyRange.ClearContents
Next i
End Sub
 
Top