View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Kyle Kyle is offline
external usenet poster
 
Posts: 66
Default delete rows which have a one in them

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?