I have a table that looks like so:
Group | Name | Comment | Tag 1 | Tag 2 | Tag 3
-----------------------------------------------------------
If you really need to have it as vba code here is one of possible solution: (some additional comments inside subroutine) Tried and tested
Sub Solution()
'Select cell with 'Group' title
'Result passed to 10th column to the right
'Macro doesn't care of headers of result table
Dim KOM As Range
Dim partGNC As Variant
Dim partTAG As Variant
Dim resRow As Long
resRow = ActiveCell.Row + 1
For Each KOM In Range(ActiveCell.Offset(1, 0), ActiveCell.End(xlDown))
partGNC = KOM.Resize(1, 3)
partTAG = Range(KOM.Offset(0, 3), KOM.End(xlToRight))
If KOM.Offset(0, 3).Address = KOM.End(xlToRight).Address Then
Cells(resRow, KOM.Column + 10).Resize(1, 3) = partGNC
Cells(resRow, KOM.Column + 13) = partTAG
resRow = resRow + 1
Else
Cells(resRow, KOM.Column + 10).Resize(UBound(partTAG, 2), 3) = partGNC
Cells(resRow, KOM.Column + 13).Resize(UBound(partTAG, 2), 1) = Application.Transpose(partTAG)
resRow = resRow + UBound(partTAG, 2)
End If
Next
End Sub