Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I need a vba code to replace all the cells having 0 value with empty cell in
a selected range. Could there be a better way than the following: Sub zerotoblank() Dim r, c, rowstart, rowend, colstart, colend As Long rowstart = Selection.Row rowend = Selection.Rows.Count + rowstart - 1 colstart = Selection.Column colend = Selection.Columns.Count + colstart - 1 For c = colstart To colend For r = rowstart To rowend If Cells(r, c) = 0 Then Cells(r, c) = "" Next r Next c End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Replacing an empty cell | Excel Discussion (Misc queries) | |||
Replacing empty cells with '-' | Excel Worksheet Functions | |||
in excel..:can't empty clip are" but already empty | Excel Discussion (Misc queries) | |||
Excel - Autom. Filter "Empty / Non Empty cells" should come first | Excel Discussion (Misc queries) | |||
How can I convert empty strings to empty cells? | Excel Discussion (Misc queries) |