Moderatori: Anthony47, Flash30005
.relativi a tre diverse variabili riportati per 4 anni diversi (3*4=12).
Sub TraslaTabella()
Application.ScreenUpdating = False
Application.Calculation = xlManual
Set Ws1 = Worksheets("Foglio1") '<<<<< modifica qui il nome del foglio origine se diverso
Set Ws2 = Worksheets("Foglio2") '<<<<< modifica qui il nome del foglio destinazione se diverso
Ws2.Cells.ClearContents
UC = Ws1.Range("IV1").End(xlToLeft).Column
UR = Ws1.Range("A" & Rows.Count).End(xlUp).Row
For RR = 2 To UR
For CC = 2 To UC
Sq2 = Ws1.Cells(RR, 1)
Ris = Ws1.Cells(RR, CC)
UR2 = Ws2.Range("A" & Rows.Count).End(xlUp).Row + 1
Ws2.Range("A" & UR2).Value = Sq2
Ws2.Range("B" & UR2).Value = Ris
Next CC
Next RR
Application.ScreenUpdating = True
Application.Calculation = xlCalculationAutomatic
End Sub
=INDIRETTO(INDIRIZZO(CONFRONTA(SINISTRA($A2;LUNGHEZZA($A2)-5);Foglio1!$A$1:$A$150;0);RESTO((RIF.RIGA()+2);4)+2+RESTO(RIF.COLONNA()+2;4)*4;;;"Foglio1"))
Sub TraslaTabella()
Application.ScreenUpdating = False
Application.Calculation = xlManual
Set Ws1 = Worksheets("DATI ORIGINALI")
Set Ws2 = Worksheets("RISULTATO")
Ws2.Range("A2:F65536").ClearContents
UC = Ws1.Range("IV1").End(xlToLeft).Column
UR = Ws1.Range("A" & Rows.Count).End(xlUp).Row
For RR = 2 To UR
For CC = 1 To UC - 1 Step 4
Sq2 = Ws1.Cells(RR, 1)
Ris1 = Ws1.Cells(RR, CC + 1)
Ris2 = Ws1.Cells(RR, CC + 2)
Ris3 = Ws1.Cells(RR, CC + 3)
Ris4 = Ws1.Cells(RR, CC + 4)
UR2 = Ws2.Range("A" & Rows.Count).End(xlUp).Row + 1
Ws2.Range("A" & UR2).Value = Sq2
Ws2.Range("C" & UR2).Value = Ris1
Ws2.Range("D" & UR2).Value = Ris2
Ws2.Range("E" & UR2).Value = Ris3
Ws2.Range("F" & UR2).Value = Ris4
Next CC
Next RR
Application.ScreenUpdating = True
Application.Calculation = xlCalculationAutomatic
End Sub
=INDIRETTO(INDIRIZZO(CONFRONTA($A2;'DATI ORIGINALI'!$A$1:$A$150;0);RESTO((RIF.RIGA()+2);4)+2+RESTO(RIF.COLONNA()+1;4)*4;;;"DATI ORIGINALI"))
Torna a Applicazioni Office Windows
Excel: formula automatica per evidenziare prodotto scaduto Autore: gamma_ray |
Forum: Applicazioni Office Windows Risposte: 3 |
Salvare file excel in formato html escludendo le immagini Autore: systemcrack |
Forum: Applicazioni Office Windows Risposte: 10 |
formula excel non visualizza risultato Autore: tommasog |
Forum: Applicazioni Office Windows Risposte: 6 |
Funzione CERCA ma con colonne dinamiche Autore: Paolo67met |
Forum: Applicazioni Office Windows Risposte: 2 |
Excel 2016 - Funzione SCARTO + INDIRETTO Autore: pl1957 |
Forum: Applicazioni Office Windows Risposte: 2 |
Visitano il forum: Nessuno e 76 ospiti