
Sub prova()
Dim i As Integer
Dim ur As Long
Dim lr As Long
ur = Cells(Rows.Count, 1).End(xlUp).Row
Application.ScreenUpdating = False
For i = 1 To ur Step 4
lr = Cells(Rows.Count, 3).End(xlUp).Row
Range(Cells(i, 1), Cells(i + 3, 1)).Copy
Cells(lr + 1, "c").PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=True
Next i
Range("a1").Select
Application.CutCopyMode = False
Application.ScreenUpdating = True
End Sub |
in A1 =SCARTO(Foglio1!$A$1;INT(RIF.RIGA()*2);RIF.COLONNA()) in B1 =SCARTO(Foglio1!$A$1;RIF.RIGA()*2+1;RIF.COLONNA()) in C1 =SCARTO(Foglio1!$A$1;RIF.RIGA()*2;RIF.COLONNA()-1) in D1 =SCARTO(Foglio1!$A$1;RIF.RIGA()*2;RIF.COLONNA()-1) in E1 =SCARTO(Foglio1!$A$1;RIF.RIGA()*2+1;RIF.COLONNA()-4) in F1 =SCARTO(Foglio1!$A$1;RIF.RIGA()*2;RIF.COLONNA()-2) |
Sub prova()
Dim ur As Long
Dim lr As Long
Dim rng As Range
Dim cel As Range
ur = Cells(Rows.Count, "B").End(xlUp).Row
Set rng = Range("B5:B" & ur)
Range("I5:l100").ClearContents
For Each cel In rng
lr = Cells(Rows.Count, "I").End(xlUp).Row
If Left(cel.Value, 5) = "match" Then
Cells(lr + 1, "I").Value = cel.Offset(0, 1).Value
Cells(lr + 1, "J").Value = cel.Offset(0, 2).Value
Cells(lr + 1, "K").Value = cel.Offset(1, 1).Value
Cells(lr + 1, "l").Value = cel.Offset(0, 3).Value
End If
Next cel
End Sub
|
