Copiare range colonna



  • Copiare range colonna
    di Luck (utente non iscritto) data: 30/11/2013 20:54:13

    Ciao a tutti, ho estremo bisogno di aiuto!!
    Ho molti file Excel all'interno di una cartella, questi file hanno tutti un foglio chiamato "FATTURA".
    Io vorrei copiare i dati contenuti nel range di colonna "B22:B58" di tutti i fogli "FATTURA" di questi file e incollarli all'interno di un unico file nel foglio "MOVIMENTI" nella colonna H partendo dalla prima cella vuota, così da avere tutti i dati consecutivi nella colonna H.

    SONO ESAURITO!!
    girando per internet ho trovato questa macro,l'ho adattata ma funziona solamente all'interno di un unico file con foglio FATTURA e foglio MOVIMENTI, mentre io come ho già detto ho molti fogli "FATTURA" relativi a diversi file excel riuniti nella stessa cartella. Spero sarà d'aiuto....
    Aiutatemi per favore..

    Grazie
     
    Public Sub m()
        
        Dim shModulo As Worksheet
        Dim shRegistro As Worksheet
        Dim lRiga As Long
        Dim lng As Long
        
        With ThisWorkbook
            Set shModulo = .Worksheets("FATTURA")
            Set shRegistro = .Worksheets("MOVIMENTI")
        End With
        
                
        
         With shRegistro
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B22").Value
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B23").Value
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B24").Value
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B25").Value
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B26").Value
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B27").Value
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B28").Value
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B29").Value
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B30").Value
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B31").Value
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B32").Value
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B33").Value
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B34").Value
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B35").Value
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B36").Value
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B37").Value
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B38").Value
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B39").Value
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B40").Value
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B41").Value
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B42").Value
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B43").Value
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B44").Value
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B45").Value
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B46").Value
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B47").Value
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B48").Value
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B49").Value
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B50").Value
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B51").Value
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B52").Value
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B53").Value
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B88").Value
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B89").Value
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B90").Value
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B91").Value
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B92").Value
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B93").Value
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B94").Value
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B95").Value
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B96").Value
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B97").Value
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B98").Value
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B99").Value
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B100").Value
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B101").Value
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B102").Value
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B103").Value
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B104").Value
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B105").Value
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B106").Value
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B107").Value
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B108").Value
    
    
    End With
            
        Set shModulo = Nothing
        Set shRegistro = Nothing
        
    End Sub



  • di Raffaele_53 (utente non iscritto) data: 01/12/2013 03:42:53

    Apri un files nuovo, inserisci il foglio movimenti e dopo in un modulo incolla il codice sotto.
    Cambia la directory dove sono i files
     
    Option Explicit
    Sub copia()
        Dim WB As Workbook
        Dim Ws1 As Worksheet
        Dim Percorso As String, nomeFile As String, Uriga As Long
        Percorso = "D:106" '<=== QUI DIGITA IL TUO PERCORSO con la  finale
        Application.ScreenUpdating = False
        Set Ws1 = ThisWorkbook.Worksheets("MOVIMENTI")
        nomeFile = Dir(Percorso)
        Do While nomeFile <> ""
            If nomeFile <> ThisWorkbook.Name Then
                Workbooks.Open (Percorso & "" & nomeFile)
                Workbooks(nomeFile).Worksheets("FATTURA").Range("B22:B58").Copy
                Uriga = Ws1.Range("H" & Rows.Count).End(xlUp).Row
                Ws1.Range("H" & Uriga).PasteSpecial
                Workbooks(nomeFile).Close False
            End If
            nomeFile = Dir
        Loop
        Application.ScreenUpdating = True
        MsgBox "Fatto"
        Set Ws1 = Nothing
    End Sub



  • di Luck (utente non iscritto) data: 01/12/2013 15:33:03

    Grazie Raffaele, però la macro che mi hai consigliato non mi gira, mi da "errore di run-time 1004" alla riga "Uriga = Ws1.Range("H" & Rows.Count).End(xlUp).Row".

    In alternativa ho trovato e arrangiato questa macro che premendo ctrl+d mi chiede il percorso della cartella dove ho i file contenenti i fogli FATTURA, poi mi copia i range B22:B53 e G22:G53 di ogni foglio FATTURA e li incolla nel file MAGAZZINO, al foglio MOVIMENTI rispettivamente nella colonna H e J partendo dalla prima cella vuota.

    A questo punto avrei bisogno del Vostro Prezioso aiuto perchè con le mie competenze non sono riuscito a adattarla al meglio.

    Vorrei:
    1) Copiare da ogni foglio FATTURA ,dei file all'interno della stessa cartella, anche i range di colonna B88:B119 e G88:G119 e incollarli nel foglio MOVIMENTI (file MAGAZZINO) nelle colonne H e J di seguito ai 2 range già precedentemente incollati.
    2) Questa macro accetta di elaborare solo file con estensione .xlsx ,io avrei tutti file .xlsm (file excel con attivazione macro). E' possibile fargli accettare anche quest'ultimi?
    3) Sarebbe grandioso se riesce a copiare la cella P4 di ogni foglio FATTURA di ogni file e incollarla nel foglio MOVIMENTI (file MAGAZZINO) nella colonna B alla riga del primo dato copiato del range B22:B53, cioè alla riga dove andrà copiato il valore della cella B22 di ogni foglio FATTURA.

    Chiedo se per cortesia potete aiutarmi perchè ormai sono piuttosto fuso....

    Spero di essere stato chiaro; allego la macro e se riesco vi carico anche il file MAGAZZINO che contiene il foglio MOVIMENTI con il risultato che vorrei ottenere. Allego anche un file Cartel1 con foglio FATTURA se volete fare eventuali prove.(ve ne metto solo uno per semplificare, ma in realtà ho molti file che vanno dentro la cartella insieme al file Cartel1)
     
    Option Explicit
    Dim file() As String
    
    Private Sub btnPercorso_Click()
        Dim F As FileDialog
        Dim filename As String
        Dim ContTot As Integer
    
        With Me
            .txtPercorso = ""
            .lstFile.Clear
            .txtTotfile = ""
    
            Set F = Application.FileDialog(msoFileDialogFolderPicker)
            If F.Show = False Then Exit Sub
            .txtPercorso = F.SelectedItems(1)
    
            filename = Dir(Me.txtPercorso & "*.xlsx", vbArchive Or vbHidden Or vbNormal Or vbReadOnly Or vbSystem)
            Do Until filename = ""
                ReDim Preserve file(ContTot)
                .lstFile.AddItem Left(filename, Len(filename))
                file(ContTot) = Left(filename, Len(filename))
                ContTot = ContTot + 1
                filename = Dir
            Loop
            .txtTotfile = ContTot
        End With
    End Sub
    
    
    Private Sub btnCarica_Click()
        Dim F As Variant, pathFile As String
        Dim rng As Range
        Dim ur As Long, righe As Long, wsdati
    
        If Me.lstFile.ListCount = 0 Then
            Call MsgBox("Non hai caricato nessun file excel." & vbCrLf & "" & vbCrLf & _
                        "Possono essere caricati soltanto i file con estensione .xlsx" _
                        , vbExclamation Or vbDefaultButton1, "Selezione_nulla")
            Exit Sub
        End If
    
        Application.ScreenUpdating = False
        Application.DisplayAlerts = False
    
        With wsMovimenti
            .Activate
            For Each F In file
                ur = .Cells(Rows.Count, "H").End(xlUp).Row + 1
                If .[h1] = "" Then ur = 1
                pathFile = Me.txtPercorso & "" & F
                Call read_dati(pathFile, ur)
            Next
    
            Unload Me
        End With
    
        Application.DisplayAlerts = True
        Application.ScreenUpdating = True
        MsgBox "Dati caricati con successo"
    End Sub
    
    Function read_dati(filename As String, ur As Long) As Long
        Dim app As New Excel.Application, wbk As Excel.Workbook
        Dim foglio As Worksheet, righe As Integer
    
        On Error Resume Next
        Set wbk = app.Workbooks.Add(filename)
        With wbk.Sheets("FATTURA")
                .Range("b22:b53").Copy
                Range("H" & ur).Select
                ActiveSheet.Paste
                wbk.Application.CutCopyMode = False
        End With
        
        On Error Resume Next
        Set wbk = app.Workbooks.Add(filename)
        With wbk.Sheets("FATTURA")
                .Range("g22:g53").Copy
                Range("J" & ur).Select
                ActiveSheet.Paste
                wbk.Application.CutCopyMode = False
        End With
    
        wbk.Close SaveChanges:=False
        app.Quit
        Set app = Nothing
    End Function
    



  • di Luck (utente non iscritto) data: 01/12/2013 15:41:00

    Ho allegato i file in formato Excel 2010, se sono piu' utili in altre versioni ditemelo e li aggiorno,
    Grazie.



  • di patel data: 01/12/2013 16:53:43

    tu hai detto
    2) Questa macro accetta di elaborare solo file con estensione .xlsx ,io avrei tutti file .xlsm (file excel con attivazione macro). E' possibile fargli accettare anche quest'ultimi?

    non mi sembra difficile correggere il codice sostituendo xlsx con xlsm oppure con xls*





  • di Luck (utente non iscritto) data: 01/12/2013 17:02:07

    Grazie di Patel, scusatemi ma non sono molto abile con le macro e in piu' sono esaurito perchè è da un bel po' di tempo che cerco di metterla appunto..

    Con gli altri 3 punti c'è qualcuno che mi da una mano please??

    Grazie



  • di Raffaele_53 (utente non iscritto) data: 01/12/2013 22:50:16

    Mi da errore alla riga......
    >>>Uriga = Ws1.Range("H" & Rows.Count).End(xlUp).Row

    Ws1 = files nuovo aperto, in più hai rinominato un foglio come MOVIMENTI


  • Copiare range colonna
    di Luck (utente non iscritto) data: 30/11/2013 21:00:41

    Ciao a tutti, ho estremo bisogno di aiuto!!
    Ho molti file Excel all'interno di una cartella, questi file hanno tutti un foglio chiamato "FATTURA".
    Io vorrei copiare i dati contenuti nel range di colonna "B22:B58" di tutti i fogli "FATTURA" di questi file e incollarli all'interno di un unico file nel foglio "MOVIMENTI" nella colonna H partendo dalla prima cella vuota, così da avere tutti i dati consecutivi nella colonna H.

    SONO ESAURITO!!
    girando per internet ho trovato questa macro,l'ho adattata ma funziona solamente all'interno di un unico file con foglio FATTURA e foglio MOVIMENTI, mentre io come ho già detto ho molti fogli "FATTURA" relativi a diversi file excel riuniti nella stessa cartella. Spero sarà d'aiuto....
    Aiutatemi per favore..

    Grazie
     
    Public Sub m()
        
        Dim shModulo As Worksheet
        Dim shRegistro As Worksheet
        Dim lRiga As Long
        Dim lng As Long
        
        With ThisWorkbook
            Set shModulo = .Worksheets("FATTURA")
            Set shRegistro = .Worksheets("MOVIMENTI")
        End With
        
                
        
         With shRegistro
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B22").Value
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B23").Value
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B24").Value
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B25").Value
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B26").Value
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B27").Value
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B28").Value
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B29").Value
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B30").Value
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B31").Value
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B32").Value
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B33").Value
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B34").Value
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B35").Value
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B36").Value
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B37").Value
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B38").Value
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B39").Value
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B40").Value
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B41").Value
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B42").Value
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B43").Value
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B44").Value
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B45").Value
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B46").Value
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B47").Value
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B48").Value
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B49").Value
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B50").Value
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B51").Value
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B52").Value
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B53").Value
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B88").Value
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B89").Value
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B90").Value
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B91").Value
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B92").Value
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B93").Value
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B94").Value
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B95").Value
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B96").Value
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B97").Value
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B98").Value
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B99").Value
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B100").Value
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B101").Value
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B102").Value
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B103").Value
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B104").Value
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B105").Value
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B106").Value
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B107").Value
            IRiga = .Range("H" & .Rows.Count).End(xlUp).Row + 1
            .Range("H" & IRiga).Value = shModulo.Range("B108").Value
    
    
    End With
            
        Set shModulo = Nothing
        Set shRegistro = Nothing
        
    End Sub



  • di patel data: 01/12/2013 08:30:04

    allega un esempio ridotto con pochi fogli





  • di Vecchio Frac data: 01/12/2013 09:33:15

    Questa discussione è il doppione di un'altra aperta poco prima dallo stesso utente nell'altra sezione del forum.
    Per favore evitiamo i duplicati, non aumentano le possibilità di risposta e si crea confusione inutile.
    Il cross posting, generalmente, non è una buona pratica per evidenziare le proprie problematiche.
    Chiudo questa: si continua nell'altra.