Hi everyone, i have a problem. i have the following codes to delete the entire row if in column I, there is a value 0.
Sub DeleteZeroRows()
Dim Zeroes As Range
'assuming that column I is the one that needs to be checked
'"I" states that it is in column I. change to your desired column alphabet.
Const AccountColumn As String = "I"
With Columns(AccountColumn)
'number 0s is all deleted (rows)
.Replace "0", "=0", xlWhole
On Error Resume Next
.SpecialCells(xlFormulas).EntireRow.Delete
End With
End Sub
However, when i retrieve my data from the add-ins, the data in column I is like this: '0. It is not purely 0.
so when i run the delete macro, it did not delete the row. But rather, it changed the data to '=0. How do i change the code so that it can delete the row?
please Help. Thanks
Sub DeleteZeroRows()
Dim Zeroes As Range
'assuming that column I is the one that needs to be checked
'"I" states that it is in column I. change to your desired column alphabet.
Const AccountColumn As String = "I"
With Columns(AccountColumn)
'number 0s is all deleted (rows)
.Replace "0", "=0", xlWhole
On Error Resume Next
.SpecialCells(xlFormulas).EntireRow.Delete
End With
End Sub
However, when i retrieve my data from the add-ins, the data in column I is like this: '0. It is not purely 0.
so when i run the delete macro, it did not delete the row. But rather, it changed the data to '=0. How do i change the code so that it can delete the row?
please Help. Thanks