Macro and a range of cells
Thank you very much. It works.:-)
Regards
ME
Sub dash_it()
For Each r In Selection
If Not IsEmpty(r) And r.Value = 0 Then
r.Value = "-"
End If
Next
End Sub
select the cells and run the macro
--
Gary''s Student - gsnu200720
"ME" wrote:
Hi All,
I have a macro which replaces zeros with "-".
I would like to use the macro in any range
of cells but I don't know how to do it.
Despite I set any range of cells, the macro
always changes zeros into "-" in entire sheet.
I'd be very grateful for your help.
Regards
ME
|