Sub SMC()
Dim varInput As Variant, varOut As Variant, varShift As Variant
Dim objDic As Object
Dim lngR As Long, lngC As Long, lngIndex As Long
Set objDic = CreateObject("Scripting.Dictionary")
objDic.Item("Employee Name") = 0
varInput = Worksheets("Input").Range("A1").CurrentRegion.Value2
For lngR = 1 + LBound(varInput) To UBound(varInput)
For lngC = 1 + LBound(varInput, 2) To UBound(varInput, 2)
If Not IsEmpty(varInput(lngR, lngC)) Then
objDic.Item(varInput(lngR, lngC)) = 0
End If
Next lngC
Next lngR
varOut = objDic.keys
ReDim varShift(1 To UBound(varOut), 1 To UBound(varInput, 2) - 1)
For lngIndex = 1 + LBound(varOut) To UBound(varOut)
For lngR = 1 + LBound(varInput) To UBound(varInput)
For lngC = 1 + LBound(varInput, 2) To UBound(varInput, 2)
If varInput(lngR, lngC) = varOut(lngIndex) Then
varShift(lngIndex, lngC - 1) = varInput(lngR, 1)
End If
Next lngC
Next lngR
Next lngIndex
With Worksheets("Output")
.UsedRange.Clear
'Could have used this line instead of the next, but for want of keeping the source format, I decided to copy the headers
'.Cells(1).Resize(, UBound(varInput, 2)).Value = Application.Index(varInput, 1)
Worksheets("Input").Range("A1").CurrentRegion.Rows(1).Copy .Cells(1)
.Cells(1).Resize(objDic.Count).Value = Application.Transpose(varOut)
.Cells(2, 2).Resize(lngIndex - 1, lngC - 2).Value = varShift
End With
End Sub