Sorting columns and Matching
Hi Jeremy,
If you prefer a macro try this out on a backup copy of your sheet...
Public Sub LineThemUp()
Dim iLastRowA As Long
iLastRowA = Range("A" & Range("A:A").Rows.Count).End(xlUp).Row
Dim iLastRowB As Long
iLastRowB = Range("B" & Range("B:B").Rows.Count).End(xlUp).Row
Dim iRowA As Long
Dim iRowB As Long
For iRowA = iLastRowA To 1 Step -1
For iRowB = iLastRowB To 1 Step -1
If Cells(iRowB, 2).Value = Cells(iRowA, 1).Value Then
Let Range(Cells(iRowA, 2), Cells(iRowA, 3)).Value = _
Range(Cells(iRowB, 2), Cells(iRowB, 3)).Value
Range(Cells(iRowB, 2), Cells(iRowB, 3)).ClearContents
Exit For
End If
Next iRowB
Next iRowA
Ken Johnson
|