Мне понравилась идея использовать удаление дубликатов, но вы должны использовать массивы для одноранговых переводов.
Option Explicit
Sub TransposeValues()
Dim i As Long, j As Long
Dim arr1 As Variant, arr2 As Variant, types As Variant, names As Variant
Dim ws1 As Worksheet, ws2 As Worksheet
Set ws1 = Worksheets("sheet5")
Set ws2 = Worksheets.Add(after:=ws1)
'set up types
With ws1.Range(ws1.Cells(1, "C"), ws1.Cells(ws1.Rows.Count, "C").End(xlUp))
ws2.Cells(1, "A").Resize(.Rows.Count, .Columns.Count) = .Value
End With
With ws2.Range(ws2.Cells(1, "A"), ws2.Cells(ws2.Rows.Count, "A").End(xlUp))
.RemoveDuplicates Columns:=1, Header:=xlYes
End With
With ws2.Range(ws2.Cells(1, "A"), ws2.Cells(ws2.Rows.Count, "A").End(xlUp))
.Cells(1, "A").Resize(.Columns.Count, .Rows.Count) = _
Application.Transpose(.Value)
.Clear
End With
'set up names
With ws1.Range(ws1.Cells(1, "A"), ws1.Cells(ws1.Rows.Count, "A").End(xlUp))
ws2.Cells(1, "A").Resize(.Rows.Count, .Columns.Count) = .Value
End With
With ws2.Range(ws2.Cells(1, "A"), ws2.Cells(ws2.Rows.Count, "A").End(xlUp))
.RemoveDuplicates Columns:=1, Header:=xlYes
End With
'collect source array
arr1 = ws1.Range(ws1.Cells(1, "A"), ws1.Cells(ws1.Rows.Count, "A").End(xlUp).Offset(0, 2)).Value
'create target array and matrix header arrays
With ws2
arr2 = .Cells(1, "A").CurrentRegion.Cells.Value
types = .Range(.Cells(1, "A"), .Cells(1, .Columns.Count).End(xlToLeft)).Value
names = .Range(.Cells(1, "A"), .Cells(.Rows.Count, "A").End(xlUp)).Value
End With
'move source to target
For i = 2 To UBound(arr1, 1)
arr2(Application.Match(arr1(i, 1), names, 0), _
Application.Match(arr1(i, 3), types, 0)) = arr1(i, 2)
Next i
'transfer target array to worksheet
ws2.Cells(1, "A").Resize(UBound(arr2, 1), UBound(arr2, 2)) = arr2
'name new target worksheet
ws2.Name = "Target"
End Sub