Home |
Search |
Today's Posts |
#4
![]() |
|||
|
|||
![]()
Thanks guys....both methods works!!!!!!
wrote in message ... Select your range and run this macro: Sub DeleteZero() Dim NumRng As Range Dim cell As Range On Error GoTo ErrorMsg Set NumRng = ActiveSheet.Cells _ .SpecialCells(xlCellTypeConstants, 1) For Each cell In Intersect(Selection, NumRng) If cell.Value = 0 Then cell.ClearContents Next Exit Sub ErrorMsg: MsgBox "No cells found!" End Sub --- To run, press ALT+F11, go to Insert Module, and paste in the code above. Press ALT+Q to close. Go to Tools Macro Macros. HTH Jason Atlanta, GA -----Original Message----- How do I set a macro to delete all 0's in a selected range or is there a function to do this? Thanks in advance for your replies. Aloysicus . |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How can I make cell data automatically shift up when deleting | Excel Discussion (Misc queries) | |||
How can I make cell data automatically shift up when deleting... | Excel Worksheet Functions | |||
cell is reinserting a formula in even after deleting it. Why | Excel Discussion (Misc queries) | |||
VBA 'deleting row if a cell in column A is a zero. | Excel Worksheet Functions | |||
GET.CELL | Excel Worksheet Functions |