Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Deleting zero values
How do I delete zero values in cells? It would be great to have a macro to
run to remove any zero values. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Deleting zero values
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. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
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. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Deleting values less than 100 | Excel Worksheet Functions | |||
deleting values in a worksheet without deleting the formulas | Excel Worksheet Functions | |||
Deleting/Changing values | Excel Programming | |||
deleting dupes/certain values | Excel Programming | |||
Deleting Rows with Same Values | Excel Programming |