Moderatori: Anthony47, Flash30005
X 5 7 4 6 etc
Y 5 4 6 etc
Z 5 4 3 etc
X 666777
Y67777
Z66777
=INDICE(Foglio1!$A7:$Z30;0;1+(RIF.COLONNA(A1)-1)*3)
Sub XYZ()
Dim deSh As String, I As Long, NextC As Long
'
Sheets("Foglio1").Select '<<< Il Foglio con i dati di partenza
For I = 1 To Cells(7, Columns.Count).End(xlToLeft).Column
deSh = Cells(7, I)
NextC = Sheets(deSh).Cells(7, Columns.Count).End(xlToLeft).Column + 1
Range(Cells(7, I), Cells(7, I).End(xlDown)).Copy Sheets(deSh).Cells(7, NextC)
Next I
End Sub
Sub XYZ()
Dim deSh As String, I As Long, NextC As Long
'
Sheets("Foglio1").Select '<<< Il Foglio con i dati di partenza
For I = 1 To Cells(6, Columns.Count).End(xlToLeft).Column
deSh = Cells(6, I)
If Len(deSh) = 1 And InStr(1, "XYZ", deSh, vbTextCompare) > 0 Then
NextC = Sheets(deSh).Cells(6, Columns.Count).End(xlToLeft).Column + 1
Range(Cells(6, I), Cells(6, I).End(xlDown)).Copy Sheets(deSh).Cells(6, NextC)
End If
Next I
End Sub
Sub XYZ()
Dim deSh As String, I As Long, NextC As Long
'
Sheets("Foglio1").Select '<<< Il Foglio con i dati di partenza
For I = Cells(6, Columns.Count).End(xlToLeft).Column To 1
deSh = Cells(6, I)
If Len(deSh) = 1 And InStr(1, "XYZ", deSh, vbTextCompare) > 0 Then
NextC = Sheets(deSh).Cells(6, Columns.Count).End(xlToLeft).Column + 1
If NextC < 5 Then NextC = 5
Range(Cells(6, I), Cells(6, I).End(xlDown)).Copy Sheets(deSh).Cells(6, NextC)
End If
Next I
End Sub
Queste istruzioni non so da dove vengono
- Codice: Seleziona tutto
Range(Range("FO7"), Range("FO" & Rows.Count).End(xlUp)).Resize(, 3).Copy Cells(7, Columns.Count).End(xlToLeft).Offset(0, 1)
Range("FI7:FJ1063").Select
Torna a Applicazioni Office Windows
Macro modifica date scelta periodo Autore: Ricky0185 |
Forum: Applicazioni Office Windows Risposte: 11 |
Inserire dati filtrati da 2 file ad un terzo file Autore: Ricky0185 |
Forum: Applicazioni Office Windows Risposte: 14 |
Supporto per sviluppo macro VBA Ordinare per data Autore: Carletto Ribolla |
Forum: Applicazioni Office Windows Risposte: 3 |
Visitano il forum: Nessuno e 27 ospiti