Posted to microsoft.public.excel.programming
|
|
delete rows which have a one in them
Don,
the final row still isn't working, i've uploaded a picture to show you what
i mean
http://i87.photobucket.com/albums/k1...icture3-10.png
"Don Guillett" wrote:
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?
.
|