I have a spreadsheet where I am comparing 2 cells, the result is placed in
Cell AQ, if the value in that cell is 0, I would like the row to be deleted,
How would I achieve this
Thanks
I have a spreadsheet where I am comparing 2 cells, the result is placed in
Cell AQ, if the value in that cell is 0, I would like the row to be deleted,
How would I achieve this
Thanks
Sub DeleteZeros()
Dim rw as Long, i as Long, rng as Range
set rw = cells(row.count,"AQ").end(xlup)
for i = rw to 1 step -1
set rng = cells(i,"AQ")
if rng <> "" then
if rng.Text = "0" then
rng.EntireRow.delete
end if
end if
Next
End Sub
--
Regards,
Tom Ogilvy
"Nigel" <nigelben@belmontpines.com> wrote in message
news:4BA3EDB9-F115-4D6D-831D-A472B166BE33@microsoft.com...
> I have a spreadsheet where I am comparing 2 cells, the result is placed in
> Cell AQ, if the value in that cell is 0, I would like the row to be
deleted,
>
> How would I achieve this
>
> Thanks
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks