I am trying to delete (clear) cell content from the bottom rows where text exists...
I started with this code but it's not flexible...
Sub delrows()
'Delete rows with text
Sheets("Prefinal").Select
Range("A1").Select
Selection.End(xlDown).Select
Range("A76:A85").Select
Range("A85").Activate
Selection.ClearContents
ActiveWorkbook.Save
End Sub
Any help is appreciated.
Example:
Column A
1 123456
2 123456
3 123456
4 123456
5 123456
6 123456
7 text1
8 text2
9 text3
I started with this code but it's not flexible...
Sub delrows()
'Delete rows with text
Sheets("Prefinal").Select
Range("A1").Select
Selection.End(xlDown).Select
Range("A76:A85").Select
Range("A85").Activate
Selection.ClearContents
ActiveWorkbook.Save
End Sub
Any help is appreciated.
Example:
Column A
1 123456
2 123456
3 123456
4 123456
5 123456
6 123456
7 text1
8 text2
9 text3