Forum Discussion
troyyy
Apr 27, 2021Copper Contributor
Align duplicates from two columns to same rows in Excel
Hello, I have the following situation: I have data (Full Name, Column A) that needs to be aligned with other Data from Column C on (Full Name and beyond). I did a very similar post recent...
HansVogelaar
Apr 27, 2021MVP
I'd run this macro:
Sub Shuffle()
Dim r As Long
Dim m As Long
Dim rng As Range
Application.ScreenUpdating = False
m = Range("A" & Rows.Count).End(xlUp).Row
Range("C2:U" & m).Insert Shift:=xlShiftDown
For r = 2 To m
Set rng = Range("C:C").Find(What:=Range("A" & r).Value, LookAt:=xlWhole)
If Not rng Is Nothing Then
rng.Resize(1, 19).Cut Destination:=Range("C" & r)
End If
Next r
Application.CutCopyMode = False
Application.ScreenUpdating = True
End Sub