Hi aeg_paul,
Try this:
Sub AEG(): Dim w1 As Worksheet, w2 As Worksheet, R1 As Range, R2 As Range
Set w1 = ActiveWorkbook.Worksheets("Sheet1"): Set w2 = ActiveWorkbook.Worksheets("Sheet2")
For Each R1 In w1.Range("A2:A" & w1.Range("A" & Rows.Count).End(xlUp).row)
For Each R2 In w2.Range("A2:A" & w2.Range("A" & Rows.Count).End(xlUp).row)
If R1 = R2 Then R2.Offset(, 1) = R1.Offset(, 1)
Next: Next: End Sub
Directions for running the routine(s) just supplied
Copy the code to the clipboard
Press ALT + F11 to open the Visual Basic Editor.
Open a macro-enabled Workbook or save your Workbook As Macro-Enabled
Select “Module” from the Insert menu
Type "Option Explicit" then paste the code under it
With the cursor between Sub and End Sub press F5 (F8 to Single Step)
OR
Press ALT + Q to close the code window.
Press ALT + F8 then double click on the macro name
Bookmarks