View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Need to compare values in two colums and delete accordingly

lastrow = cells(rows.count,1).end(xlup).row
for i = lastrow to 1 step -1
if cells(i,"A").Value = cells(i,"C").Value then
rows(i).Delete
end if
Next


--
Regards,
Tom Ogilvy


wrote in message
ups.com...
In a row, if column A and column C have the same value, I need to
delete that row and then loop through to the end of the spreadsheet.

Can anyone assist?

Thank you