问题描述:

I want to delete all values starting from A2:O2 and LOWER , i.e. A3:O3, A4:O4, A5:O5

 A B C .... O P Q

1 ..............................

2 deletedeletedeletedeletedelete

3 deletedeletedeletedeletedelete

4 deletedeletedeletedeletedelete

5 deletedeletedeletedeletedelete

I am not sure how to do this

Sub DeleteLower()

Range("A2:O1048576").Select

Selection.SpecialCells(xlCellTypeConstants, 23).Select

Selection.ClearContents

end sub

How do I explain that I need the range of "A2:0 infinity " "A2:O1048576" ?

网友答案:

Perhaps something like this would work for you:

Sub RemoveValues()
    ActiveSheet.Range(ActiveSheet.Range("A2:O2").Address, ActiveSheet.Cells(Rows.Count, 1).Address).ClearContents
End Sub

This will remove all content from cells A2:O2 and downward.

相关阅读:
Top