
Sub TraspVal()
Dim TR, Rig, Col
Dim Valore
Rig = 1
Col = 2
TR = Cells(Rows.Count, 1).End(xlUp).Row ''conta le righe
For I = 1 To TR Step 1
Valore = Cells(I, 1)
Cells(Rig, Col) = Valore
If Col = 4 Then
Col = 1
Rig = Rig + 1
End If
Col = Col + 1
Next I
End Sub
|
questa riga If Col = 4 Then in questa If Col = 9 Then ''colonne da utilizzare |
''macro in questione
Sub TraspVal()
Dim TR, Rig, Col
Dim Valore
Rig = 2
Col = 3
TR = Cells(Rows.Count, 1).End(xlUp).Row ''conta le righe
For I = 2 To TR Step 1
Valore = Cells(I, 1)
Cells(Rig, Col) = Valore
If Col = 10 Then ''colonne da utilizzare
Col = 2
Rig = Rig + 1
End If
Col = Col + 1
Next I
End Sub
|
