Macro para copiar de varias hojas de un libro filas a otra hoja en columnas consecutivas

Buenas tardes, agradecería ayuda con el siguiente tema necesito copiar desde un libro con varias hojas, filas a otra hoja del mismo libro de forma transpuesta y consecutiva, no puedo lograr ir a la próxima hoja para realizar la misma operación y asi hasta la ultima hoja.

' Sheets("OC 622 Biomet").Select Range("C8:D14").Select Selection.Copy Sheets("Hoja1").Select Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=True Range("E4:F5").Select Application.CutCopyMode = False With Selection .HorizontalAlignment = xlGeneral .VerticalAlignment = xlBottom .WrapText = False .Orientation = 0 .AddIndent = False .IndentLevel = 0 .ShrinkToFit = False .ReadingOrder = xlContext .MergeCells = True End With With Selection .HorizontalAlignment = xlGeneral .VerticalAlignment = xlBottom .WrapText = False .Orientation = 0 .AddIndent = False .IndentLevel = 0 .ShrinkToFit = False .ReadingOrder = xlContext .MergeCells = True End With Selection.UnMerge Range("A5").Select End Sub
De ante mano muchas gracias
Rodolfo

1 respuesta

Respuesta
1

Con la siguiente macro

Sub Transpon()
'por.dam
j = 1
For Each hoja In Worksheets
    Sheets(hoja.Name).Select
    Select Case hoja.Name
        Case "Hoja1"
        Case Else
            Range("C8:D14").Select
            Selection.Copy
            Sheets("hoja1").Select
            Range("A" & j).Select
            Selection.PasteSpecial Paste:=xlPasteAll, _
            Operation:=xlNone, SkipBlanks:=False, Transpose:=True
            j = j + 2
    End Select
Next
End Sub

Copia el rango "C8:D14", de cada hoja a la hoja "Hoja1".

Prueba y me comentas.

Saludos. Dam
Si es lo que necesitas.

Añade tu respuesta

Haz clic para o

Más respuestas relacionadas