Thread: Zeros in blanks
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default Zeros in blanks

Select a range and then:

Sub noBlank()
For Each r In Selection
If r.Value = "" Then
r.Value = 0
End If
Next
End Sub

--
Gary''s Student - gsnu200828


"MikeF" wrote:

I have zeros for blanks turned off as an Excel option.
But in some ranges on some sheets, need a "if cell value = "" then make it
zero" routine.

Best suggestions??

Thanx,
- Mike