delete all the cell that contains more than 25 characters

G

Gary''s Student

Enter and run this small macro:


Sub long_clearer()
Dim r As Range
For Each r In ActiveSheet.UsedRange
If Len(r.Value) > 25 Then
r.Clear
End If
Next
End Sub
 
E

elaine216

Thank you very much!

Gary''s Student said:
Enter and run this small macro:


Sub long_clearer()
Dim r As Range
For Each r In ActiveSheet.UsedRange
If Len(r.Value) > 25 Then
r.Clear
End If
Next
End Sub
 
Top