I use this macro to fill selected cells with zero but I need to have the original workbook that it was created in open in order to run it.
Sub replaceBlankWithZero()
Dim rng As Range
Selection.Value = Selection.Value
For Each rng In Selection
If rng = "" Or rng = " " Then
rng.Value = "0"
Else
End If Next rng
End Sub
I’m not sure how to change it to work on all workbooks without having to open the original.
New contributor
Tom Byrne is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.