View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
K McCurry[_2_] K McCurry[_2_] is offline
external usenet poster
 
Posts: 4
Default Deleting zero values

Thank You!!! That worked Great!

"Tom Ogilvy" wrote:

If you don't want to see them, you can go to tools=Options=View and
uncheck Zeros.

If you really want to remove them

dim rng as Range, cell as Ragne
Dim rng1 as Ragne
on error resume next
set rng = Activesheet.UsedRange.Specialcells(xlConstants, xlNumbers)
set rng1 = Activesheet.UsedRange.SpecialCells(xlFormulas, xlNumbers)
On Error goto 0
if not rng is nothing then
for each cell in rng
if cell.value = 0 then cell.clearcontents
next
end if
if not rng1 is nothing then
for each cell in rng1
if cell.value = 0 then cell.clearcontents
next
end if

--
Regards,
Tom Ogilvy

"K McCurry" <K wrote in message
...
How do I delete zero values in cells? It would be great to have a macro

to
run to remove any zero values.