View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jim D.[_2_] Jim D.[_2_] is offline
external usenet poster
 
Posts: 16
Default Can this be done? If bn=b(n+1) and cn=c(n+1) then delete row (n+1)

I'm not sure I understand your criteria, but a quick and dirty VBA to get rid
of dirty rows would look something like below. Hope that helps you out some.
sub()
do until i (total rows)
if range().offset(i,0).value = (your criteria)
range.entirerow.delete
i = i - 1
end if
i = i + 1
loop
end sub


"John Smith" wrote:

I would like to delete repetitive rows. The logic is like this:

If bn=b(n+1) and cn=c(n+1) then delete row (n+1)?

Can this be done easily?