G
Guest
I have a rather large spreadsheet and need to delete multiple rows with
contain a value of 0. I ran a macro which worked, but it deleted not only
rows which contained 0, but all other rows which contained figures has a 0.
How can I delete rows containing ONLY 0 and not rows containing figures like
650? Or is there another method I should use for this, or is it possible to
do this without having to delete these rows one by one. The following is
what I used as a macro:
Sub Find_0()
Dim rng As Range
Dim what As String
what = "0"
Do
Set rng = ActiveSheet.UsedRange.Find(what)
If rng Is Nothing Then
Exit Do
Else
Rows(rng.Row).Delete
End If
Loop
End Sub
Thanks so much!
contain a value of 0. I ran a macro which worked, but it deleted not only
rows which contained 0, but all other rows which contained figures has a 0.
How can I delete rows containing ONLY 0 and not rows containing figures like
650? Or is there another method I should use for this, or is it possible to
do this without having to delete these rows one by one. The following is
what I used as a macro:
Sub Find_0()
Dim rng As Range
Dim what As String
what = "0"
Do
Set rng = ActiveSheet.UsedRange.Find(what)
If rng Is Nothing Then
Exit Do
Else
Rows(rng.Row).Delete
End If
Loop
End Sub
Thanks so much!