cgmojoco
Well-known Member
- Joined
- Jan 15, 2005
- Messages
- 699
I'm using the below macro to remove all 0's from a dataset however I would like it to skip locked cells without generating an error so that I can preserve formulas with result=0.
Thank you in advance for whomever can shine light on this :wink:
***Remove 0's
Sub Macro1()
Dim rng As Range
Dim rngCell As Range
Set rng = Range("A1:CY1000")
For Each rngCell In rng
If rngCell.Value = 0 Then
rngCell.Value = ""
End If
Next rngCell
End Sub
Thank you in advance for whomever can shine light on this :wink:
***Remove 0's
Sub Macro1()
Dim rng As Range
Dim rngCell As Range
Set rng = Range("A1:CY1000")
For Each rngCell In rng
If rngCell.Value = 0 Then
rngCell.Value = ""
End If
Next rngCell
End Sub