sujittalukde
05-22-2008, 06:42 AM
I am using the following code to clear the constants in selection.
Sub clrconstants()
Dim cell As Range
For Each cell In Selection
If cell.HasFormula <> True Then
cell.Clear
End If
Next
End Sub
Now the selection is done manually which I want that code should select the range automatically upto the last used column and last used row.
Row 1 should be spared as it is header row.
A workbook is attached for ready reference.
Sub clrconstants()
Dim cell As Range
For Each cell In Selection
If cell.HasFormula <> True Then
cell.Clear
End If
Next
End Sub
Now the selection is done manually which I want that code should select the range automatically upto the last used column and last used row.
Row 1 should be spared as it is header row.
A workbook is attached for ready reference.