Sub 選取範圍清除0()
Dim Rng As Range, xCell As Range
Dim xRows As Integer
xTitleId = "清除0"
Set WorkRng = Application.Selection
Set WorkRng = Application.InputBox("選取範圍清除0", xTitleId, WorkRng.Address, Type:=8)
Application.ScreenUpdating = False
Application.DisplayAlerts = False
Range("Rng").Select
If Rng = 0 Then
Range("Rng").ClearContents
End If
Application.DisplayAlerts = True
Application.ScreenUpdating = True
End Sub作者: samwang 時間: 2021-4-23 08:20
Sub 選取範圍清除0()
Dim Rng As Range, xCell As Range
Dim xRows As Integer
xTitleId = "清除0"
Set WorkRng = Application.Selection
Set WorkRng = Application.InputBox("選取範圍清除0", xTitleId, WorkRng.Address, Type:=8)
Application.ScreenUpdating = False
Application.DisplayAlerts = False
For Each Rng In WorkRng
If Rng = 0 Then Rng.ClearContents
Next
Application.DisplayAlerts = True
Application.ScreenUpdating = True
End Sub作者: abc9gad2016 時間: 2021-4-23 15:29
回復 abc9gad2016
請測試看看,謝謝。
Sub 選取範圍清除0()
Dim Rng As Range, xCell As Range
D ...
samwang 發表於 2021-4-23 08:20