Data preklopíš napr. takto:Sub test()
Dim myArr As Variant, i As Byte, j As Byte, k As Byte
myArr = Sheet1.[B2].CurrentRegion
k = 3
With Sheet2
.Cells.Clear
For i = 1 To UBound(myArr, 1)
For j = 2 To UBound(myArr, 2)
If myArr(i, j) <> "" Then
.Cells(k, 2) = myArr(i, 1)
.Cells(k, 3) = myArr(i, j)
k = k + 1
End If
Next j
Next i
End With
End Sub
formátovanie si už dorobíš, mám za to, že ti ide primárne o tú transformáciu..citovat
Dim myArr As Variant, i As Byte, j As Byte, k As Byte
myArr = Sheet1.[B2].CurrentRegion
k = 3
With Sheet2
.Cells.Clear
For i = 1 To UBound(myArr, 1)
For j = 2 To UBound(myArr, 2)
If myArr(i, j) <> "" Then
.Cells(k, 2) = myArr(i, 1)
.Cells(k, 3) = myArr(i, j)
k = k + 1
End If
Next j
Next i
End With
End Sub
formátovanie si už dorobíš, mám za to, že ti ide primárne o tú transformáciu..citovat