View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
bgeier[_18_] bgeier[_18_] is offline
external usenet poster
 
Posts: 1
Default compare two worksheets and delete rows


Not to usurp any credit from Tom, nor to "show him up", but this ma
work.

Replace
If sh1.Cells(i, "A").Value = sh2.Cells(i, "A").Value Then

with
If sh1.Cells(i, "A").Value = Cells.Find(sh1.Cells(i, "A").Value
ActiveCell, xlFormulas, xlWhole, xlByColumns, xlPrevious, False, False
Then

This should search the entire sheet2 to find the value on sheet

--
bgeie
-----------------------------------------------------------------------
bgeier's Profile: http://www.excelforum.com/member.php...fo&userid=1282
View this thread: http://www.excelforum.com/showthread.php?threadid=54599