macros excel unir hojas

Post on 14-Feb-2018

233 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

  • 7/23/2019 Macros Excel Unir Hojas

    1/1

    Sub todas()'por luismondeloApplication.DisplayAlerts = FalseFor Each hoja In ActiveWorkbook.SheetsIf hoja.Name = "todas" Then hoja.DeleteNextSheets.Add before:=Sheets(1)ActiveSheet.Name = "todas"For x = 2 To Sheets.CountSheets(x).SelectRange("a1:o" & Range("a65000").End(xlUp).Row).CopySheets("todas").Range("a65000").End(xlUp).Offset(1, 0).PasteSpecial Paste:=xlValuesNextSheets("todas").SelectEnd Sub

top related