Thread
:
delete rows which have a one in them
View Single Post
#
3
Posted to microsoft.public.excel.programming
Don Guillett[_2_]
external usenet poster
Posts: 1,522
delete rows which have a one in them
finalrow = celss(rows.count, 1).end(xlup).row
finalrow = cells(rows.count, 1).end(xlup).row
endif
end if
sub delete()
for i = cells(rows.count, 1).end(xlup).row to 2 step-1
if cells(i, 8) = 1 then rows(i).delete
next i
end sub
--
Don Guillett
Microsoft MVP Excel
SalesAid Software
"kyle" wrote in message
...
i've got this code built that will delete a row if there is a one in
column h
but it's not working
sub delete()
finalrow = celss(rows.count, 1).end(xlup).row
for i = finalrow to 2 step -1
if cells(i, 8) = 1 then
cells(i, 1).entirerow.delete
endif
next i
end sub
it doesn't work, what do you think is wrong?
Reply With Quote
Don Guillett[_2_]
View Public Profile
Find all posts by Don Guillett[_2_]