Try this code
Sub MoveData()
With Sheets("Sheet1")
LastRow = .Range("A" & Rows.Count).End(xlUp).Row
RowCount = 1
Do While RowCount <= LastRow
ID = .Range("B" & RowCount)
If ID < "" Then
Num1 = .Range("D" & RowCount)
Num2 = .Range("E" & RowCount)
With Sheets("Sheet2")
Set c = .Columns("B").Find(what:=ID, _
LookIn:=xlValues, lookat:=xlWhole)
If c Is Nothing Then
MsgBox ("Cannot find ID : " & ID)
Else
Range("D" & c.Row) = Num1
Range("A" & (c.Row + 1)) = Num2
End If
End With
End If
RowCount = RowCount + 1
Loop
End With
End Sub
--
joel
------------------------------------------------------------------------
joel's Profile: 229
View this thread:
http://www.thecodecage.com/forumz/sh...d.php?t=165075
Microsoft Office Help