|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
- Sub Del_删除选定区域的空单元格() '或者删除整行
- On Error Resume Next
- Dim response$, rng As Range
- Set rng = Application.InputBox("输入空行所在的列", Title:="输入", Type:=8)
- If rng Is Nothing Then Exit Sub
- response = MsgBox("删除整行选择【是】,删除单个单元格选择【否】", vbYesNoCancel, Title:="选择")
- Select Case response
- Case Is = vbYes
- rng.SpecialCells(xlCellTypeBlanks).EntireRow.Delete
- Case Is = vbNo
- rng.SpecialCells(xlCellTypeBlanks).Delete shift:=xlUp
- Case Is = vbCancel
- End Select
- End Sub
复制代码 |
评分
-
1
查看全部评分
-
|