Excel formula 问题是关于一个公式,你可以考虑在这个公式中添加屏幕截图,以帮助不熟悉所有菜单的人。 TELEPHONE NUMBERS ---------- 49 5235102027 <-- Cell has 0 value but shouldn't rem

Excel formula 问题是关于一个公式,你可以考虑在这个公式中添加屏幕截图,以帮助不熟悉所有菜单的人。 TELEPHONE NUMBERS ---------- 49 5235102027 <-- Cell has 0 value but shouldn't rem,excel-formula,excel-2010,Excel Formula,Excel 2010,问题是关于一个公式,你可以考虑在这个公式中添加屏幕截图,以帮助不熟悉所有菜单的人。 TELEPHONE NUMBERS ---------- 49 5235102027 <-- Cell has 0 value but shouldn't removed! 35 2578945655 0 <-- Remove this 90 5322720638 48 5396329155 for all worksheet.rows if cell.


问题是关于一个公式,你可以考虑在这个公式中添加屏幕截图,以帮助不熟悉所有菜单的人。
TELEPHONE NUMBERS
----------
49 5235102027   <-- Cell has 0 value but shouldn't removed!
35 2578945655
0               <-- Remove this   
90 5322720638
48 5396329155
for all worksheet.rows
    if cell.value == 0
        then cell.value = " "
    endif
endfor
Sub deletezeros()
    Dim c As Range
    Dim searchrange As Range
    Dim i As Long

    Set searchrange = ActiveSheet.Range("A1", ActiveSheet.Range("A65536").End(xlUp))

    For i = searchrange.Cells.Count To 1 Step -1
        Set c = searchrange.Cells(i)
        If c.Value = "0" Then c.EntireRow.delete
    Next i
End Sub