Clearing only cells w/ numbers
DIM rSource as Range
SET rSource = somerange
if LEFT(TRIM(rSource.Formula),1)="=" Then
'' its a formula -- leave it
end if
"John" wrote:
I have a for loop that I want to clear only cells w/ numbers and not cells
that contain formulas or text. The following ignores cells w/ text, but
clear formulas.
If IsNumeric(Sheets(ToSheet).Range("List1").Rows(i)) Then
Sheets(ToSheet).Range("List1").Rows(i).ClearConten ts
End If
How do I test for for a formula in a cell?
I appreciate your help, -John
|