Clearing Range of Data in Excel - Values ONLY

How do I use the “Clear Sheet/Range/Table” activity, to clear some data in a range of cells, without clearing the formatting of the cells?
image

@Thobile_Bengane,

You can use VBA code for this.

Thanks,
Ashok :slight_smile:

@Thobile_Bengane

Sub ClearRangeContents()
    Dim ws As Worksheet
    Dim rng As Range
    
    ' Specify the sheet name and range here
    Set ws = ThisWorkbook.Sheets("Sheet1")  ' Change to your sheet name
    Set rng = ws.Range("A1:C10")  ' Change to your desired range
    
    ' Clear the contents of the range without affecting the formatting
    rng.ClearContents
End Sub

Use invoke vba activity