Reset value in a range to zero : Range Value « Excel « VBA / Excel / Access / Word






Reset value in a range to zero

 
Sub ResetValuesToZero2()
    For Each n In Worksheets("Sheet1").Range("WorkArea1")    '   Substitute your information here
        If n.Value <> 0 Then
            n.Value = 0
        End If
    Next n
End Sub

 








Related examples in the same category

1.Sum the range
2.Return cell value in a range as an array
3.Change cell A1 and move to cell A2 and change it
4.Clear NonDate Cells
5.Transferring one-dimensional arrays with build-in function