Option Explicit

Sub consolidar_abiertos()
    Dim Ventana As Window
    Dim EstaVentana As Window
    
    Workbooks.Add
    Set EstaVentana = ActiveWindow
    
    For Each Ventana In Application.Windows
        If Ventana.Caption <> EstaVentana.Caption Then
            Ventana.Activate
            Range("A1").Select
            Range(Selection, ActiveCell.SpecialCells(xlLastCell)).Select
            Selection.Copy
            EstaVentana.Activate
            ActiveCell.SpecialCells(xlLastCell).Select
            ActiveCell.Offset(1, 0).Range("A1").Select
            Selection.End(xlToLeft).Select
            ActiveSheet.Paste
            Application.CutCopyMode = False
        End If
    Next Ventana
End Sub

