È soltanto un Pokémon con le armi o è un qualcosa di più? Vieni a parlarne su Award & Oscar!
 
Pagina precedente | 1 | Pagina successiva
Vota | Stampa | Notifica email    
Autore

Duplicare elenco verticale in orizzontale

Ultimo Aggiornamento: 05/02/2019 20:34
Post: 3.698
Registrato il: 28/06/2011
Città: AGORDO
Età: 70
Utente Master
2013
OFFLINE
03/02/2019 12:23

Importanti le parole CONIUGATO,SEPARATO,CELIBE... Pure 0/1/2 ecc figli
Option Explicit
Sub Orriz()
Dim Ur, R, X, Y, C
Ur = Range("A" & Rows.Count).End(xlUp).Row
For X = 4 To Ur
    If Cells(X, 3) = "CELIBE" Then
        C = 13
        Range(Cells(X, 1), Cells(X, 2)).Copy
        Cells(X, 9).PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
        If Cells(X, 4) <> 0 Then
            For Y = 0 To Cells(X, 4)
                Range(Cells(X, 6 + C), Cells(X, 7 + C)).Copy
                Cells(X, 6 + C).PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
                C = C + 2
            Next Y
        End If
    ElseIf Cells(X, 3) = "SEPARATO" Then
        Range(Cells(X, 1), Cells(X, 2)).Copy
        Cells(X, 9).PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
        If Cells(X, 4) > 0 Then
            C = 13
            For Y = 1 To Cells(X, 4)
                Range(Cells(X + Y, 6), Cells(X + Y, 7)).Copy
                Cells(X, C).PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
                C = C + 2
            Next Y
            X = X + Y
        End If
    ElseIf Cells(X, 3) = "CONIUGATO" Then
        Range(Cells(X, 1), Cells(X, 2)).Copy
        Cells(X, 9).PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
        Range(Cells(X, 6), Cells(X, 7)).Copy
        Cells(X, 11).PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
        If Cells(X, 4) > 0 Then
            C = 13
            For Y = 1 To Cells(X, 4)
                Range(Cells(X + Y, 6), Cells(X + Y, 7)).Copy
                Cells(X, C).PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
                C = C + 2
            Next Y
            X = X + Y
        End If
    End If
Next X
End Sub
Excel 2013
Vota:
Amministra Discussione: | Chiudi | Sposta | Cancella | Modifica | Notifica email Pagina precedente | 1 | Pagina successiva
Nuova Discussione
 | 
Rispondi
Cerca nel forum
Tag discussione
Discussioni Simili   [vedi tutte]
Feed | Forum | Bacheca | Album | Utenti | Cerca | Login | Registrati | Amministra
Tutti gli orari sono GMT+01:00. Adesso sono le 18:42. Versione: Stampabile | Mobile | Regolamento | Privacy
FreeForumZone [v.6.1] - Copyright © 2000-2024 FFZ srl - www.freeforumzone.com