Welcome to the Forum Strup!
First, it is your first post so I will remind you of the rules (see below) but also answer your question. Please ensure you review the rules and observe them in future posts.
I strongly recommend against using ActiveCell as a variable name because it is a built-in object in Excel VBA and you could really get tangled up with that.
Do you really need to review every cell in the range A1:AI1000? An alternative might be to use CurrentSheet.UsedRange if you don't know in advance which cells are being used.
Sub Replace0()
Dim CurrentCell As Range
Dim CurrentSheet As Worksheet
For Each CurrentSheet In Worksheets
For Each CurrentCell In CurrentSheet.Range("A1:AI1000")
If CurrentCell.Value = "0" Then
CurrentCell.Value = "0.0000000001"
End If
Next CurrentCell
Next CurrentSheet
End Sub
Your post does not comply with Rule 3 of our Forum RULES.
Use code tags around code.
Posting code between [CODE] [/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.
Highlight your code and click the
# icon at the top of your post window. More information about these and other tags can be found
here
Bookmarks