Thread: Comparing
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
merjet merjet is offline
external usenet poster
 
Posts: 812
Default Comparing

Sub Macro1()
Dim iRow As Integer
Dim ws As Worksheet
Dim ws2 As Worksheet
iRow = 2
Set ws = Sheets("Master")
Set ws2 = Sheets("Compare")
Do
If ws.Cells(iRow, 1) < ws2.Cells(iRow, 1) _
Then ws2.Cells(iRow, 1).Insert Shift:=xlDown
ws.Range("B" & iRow & ":D" & iRow).Copy _
ws2.Range("B" & iRow)
iRow = iRow + 1
Loop Until ws.Cells(iRow, 1) = ""

End Sub

Hth,
Merjet