Assuming that your data has a header row and the column to move is E then the following macro should work.
![]()
Sub Test() For N = Cells(Rows.Count, 1).End(xlUp).Row To 2 Step -1 If Cells(N, 1) = Cells(N - 1, 1) Then FirstRow = Columns(1).Find(Cells(N, 1), Cells(1, 1), xlValues, xlWhole).Row Cells(FirstRow, Columns.Count).End(xlToLeft).Offset(0, 1) = Cells(N, 5) Rows(N).Delete End If Next N End Sub
Bookmarks