S S P P Member Jun 17, 2022 #1 Good Morning! How to clear the cells only from the table as in the example Attachments SPP How to clear the cells only from the table.xlsm SPP How to clear the cells only from the table.xlsm 20.5 KB · Views: 11
Belleke Well-Known Member Jun 17, 2022 #2 Do you mean this? Code: Sub CleanCells() With Sheets("Plan1").ListObjects("Tabela1") If Not .DataBodyRange Is Nothing Then .DataBodyRange.ClearContents End With End Sub
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 Jun 17, 2022 #5 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
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