Sub 宏2()
If ActiveSheet.AutoFilterMode = True Then
ActiveSheet.AutoFilterMode = False
End If
If Application.WorksheetFunction.CountIf(Range("a:a"), Range("a1")) = 1 Then GoTo 1
r = Cells(Rows.Count, 1).End(xlUp).Row '行数
c = Cells(2, Columns.Count).End(xlToLeft).Column '列数
Rows("1:1").Select
Selection.AutoFilter
Selection.AutoFilter Field:=1, Criteria1:=Range("a1")
Rows("2:" & r).Select
Selection.Delete Shift:=xlUp
1:
Rows("1:1").Select
ActiveSheet.AutoFilterMode = False
End Sub
相关文章
- 10-26【邻接表】72 邻接表:删除一个顶点
- 10-26P99、面试题13:在o(1)时间删除链表结点
- 10-26怎么删除windows中无用的服务
- 10-26sql2000添加表注释,列注释 及修改 删除 注释
- 10-26删除JSONObject value为空的属性
- 10-26vue 实现购物车列表右滑删除功能
- 10-26pandas删除dataframe列
- 10-26mongo 删除内嵌数组元素
- 10-26lvm 逻辑卷分区删除恢复
- 10-26opencv 轮廓的外围多边形提取或者删除最小最大轮廓