nmgmarques
Board Regular
- Joined
- Mar 1, 2011
- Messages
- 133
- Office Version
- 365
- Platform
- Windows
Hi all.
Trying to clear Table1 in Worksheet "Análise" without destroying my formulas or existing data validation. This is the original look.
So far I have tried:
This clears only cells without formulas and doesn't destroy data validation, but doesn't delete rows nor blank out the cells with formulas.
Also tried:
This cleared the entire table, left the data validation, but destroyed the formulas and didn't delete empty rows.
And of course:
This one is the closes I got. Deleted all rows except first, leaving it empty. Didn't remove data validation, but did destroy the formulas.
Can anyone suggest a way to clear, delete empty rows, but keep formulas and validation in first row?
Trying to clear Table1 in Worksheet "Análise" without destroying my formulas or existing data validation. This is the original look.
So far I have tried:
Code:
Sub ClearTables()
With Worksheets("Análise").ListObjects("Table1")
If Not .DataBodyRange Is Nothing Then
[B] .DataBodyRange.SpecialCells(xlCellTypeConstants).ClearContents[/B]
End If
End With
End Sub
Also tried:
Code:
.DataBodyRange.ClearContents
And of course:
Code:
.DataBodyRange.Delete
Can anyone suggest a way to clear, delete empty rows, but keep formulas and validation in first row?
Last edited: