Sub Macro2() ' ' Macro2 Macro ' ' Rows("1:13").Select Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Columns("C:D").Select Selection.Cut Destination:=Columns("P:Q") Columns("N:O").Select Range("O1").Activate Selection.Delete Shift:=xlToLeft Columns("K:K").Select Selection.Delete Shift:=xlToLeft ActiveWindow.ScrollColumn = 6 ActiveWindow.ScrollColumn = 5 ActiveWindow.ScrollColumn = 4 ActiveWindow.ScrollColumn = 3 ActiveWindow.ScrollColumn = 2 ActiveWindow.ScrollColumn = 1 Columns("C:D").Select Range("D1").Activate Selection.Delete Shift:=xlToLeft Range("A13").Select ActiveCell.FormulaR1C1 = "Patentes" Range("A13").Select ActiveCell.FormulaR1C1 = "Patente" Range("B13").Select ActiveCell.FormulaR1C1 = "Pedimentos" Range("C13").Select ActiveCell.FormulaR1C1 = "Clave Docum" Range("D13").Select ActiveCell.FormulaR1C1 = "Fecha Entrada" Range("E13").Select ActiveCell.FormulaR1C1 = "Fecha Pago" Range("F13").Select ActiveCell.FormulaR1C1 = "RFC Imp. Exp." Range("G13").Select ActiveCell.FormulaR1C1 = "CURP" Range("H13").Select ActiveCell.FormulaR1C1 = "Peso Brutio" Range("H13").Select Selection.ClearContents ActiveCell.FormulaR1C1 = "Peso Bruto" Range("H14:H683").Select ActiveWindow.SmallScroll Down:=-228 ActiveWindow.ScrollRow = 428 ActiveWindow.ScrollRow = 426 ActiveWindow.ScrollRow = 423 ActiveWindow.ScrollRow = 414 ActiveWindow.ScrollRow = 389 ActiveWindow.ScrollRow = 353 ActiveWindow.ScrollRow = 297 ActiveWindow.ScrollRow = 256 ActiveWindow.ScrollRow = 215 ActiveWindow.ScrollRow = 166 ActiveWindow.ScrollRow = 130 ActiveWindow.ScrollRow = 93 ActiveWindow.ScrollRow = 74 ActiveWindow.ScrollRow = 52 ActiveWindow.ScrollRow = 30 ActiveWindow.ScrollRow = 16 ActiveWindow.ScrollRow = 8 ActiveWindow.ScrollRow = 1 Columns("H:H").Select Selection.NumberFormat = "0.000" Columns("I:I").Select Selection.NumberFormat = "$#,##0.00;[Red]$#,##0.00" Range("I13").Select ActiveCell.FormulaR1C1 = "Contribuciones" Range("J13").Select ActiveCell.FormulaR1C1 = "Banco" Range("K13").Select ActiveCell.FormulaR1C1 = "Ped Orig" Range("L13").Select ActiveCell.FormulaR1C1 = "Ped Rectif" Range("F2").Select Cells.Replace What:="\N", Replacement:=" ", LookAt:=xlPart, SearchOrder _ :=xlByRows, MatchCase:=False, SearchFormat:=False, ReplaceFormat:=False Range("E7").Select ActiveCell.FormulaR1C1 = _ "Relacion de Operaciones Correspondientes a la semana No." Range("E8").Select ActiveCell.FormulaR1C1 = "Comprendida del " Range("C10").Select ActiveCell.FormulaR1C1 = "Patente: " Range("C10").Select Selection.ClearContents Range("B10").Select ActiveCell.FormulaR1C1 = "Patente : " Range("C10").Select ActiveCell.FormulaR1C1 = "=R[4]C[-2]" Columns("A:L").Select Columns("A:L").EntireColumn.AutoFit ActiveWindow.ScrollColumn = 6 ActiveWindow.ScrollColumn = 5 ActiveWindow.ScrollColumn = 4 ActiveWindow.ScrollColumn = 3 ActiveWindow.ScrollColumn = 2 Range("E16").Select Columns("E:E").ColumnWidth = 13.71 Columns("E:E").ColumnWidth = 11.43 Range("B13:L1292").Select Selection.Borders(xlDiagonalDown).LineStyle = xlNone Selection.Borders(xlDiagonalUp).LineStyle = xlNone With Selection.Borders(xlEdgeLeft) .LineStyle = xlContinuous .ColorIndex = 0 .TintAndShade = 0 .Weight = xlThin End With With Selection.Borders(xlEdgeTop) .LineStyle = xlContinuous .ColorIndex = 0 .TintAndShade = 0 .Weight = xlThin End With With Selection.Borders(xlEdgeBottom) .LineStyle = xlContinuous .ColorIndex = 0 .TintAndShade = 0 .Weight = xlThin End With With Selection.Borders(xlEdgeRight) .LineStyle = xlContinuous .ColorIndex = 0 .TintAndShade = 0 .Weight = xlThin End With With Selection.Borders(xlInsideVertical) .LineStyle = xlContinuous .ColorIndex = 0 .TintAndShade = 0 .Weight = xlThin End With With Selection.Borders(xlInsideHorizontal) .LineStyle = xlContinuous .ColorIndex = 0 .TintAndShade = 0 .Weight = xlThin End With Range("A13:A1292").Select Selection.Borders(xlDiagonalDown).LineStyle = xlNone Selection.Borders(xlDiagonalUp).LineStyle = xlNone With Selection.Borders(xlEdgeLeft) .LineStyle = xlContinuous .ColorIndex = 0 .TintAndShade = 0 .Weight = xlThin End With With Selection.Borders(xlEdgeTop) .LineStyle = xlContinuous .ColorIndex = 0 .TintAndShade = 0 .Weight = xlThin End With With Selection.Borders(xlEdgeBottom) .LineStyle = xlContinuous .ColorIndex = 0 .TintAndShade = 0 .Weight = xlThin End With With Selection.Borders(xlEdgeRight) .LineStyle = xlContinuous .ColorIndex = 0 .TintAndShade = 0 .Weight = xlThin End With With Selection.Borders(xlInsideVertical) .LineStyle = xlContinuous .ColorIndex = 0 .TintAndShade = 0 .Weight = xlThin End With With Selection.Borders(xlInsideHorizontal) .LineStyle = xlContinuous .ColorIndex = 0 .TintAndShade = 0 .Weight = xlThin End With Range("B10:C10").Select Selection.Borders(xlDiagonalDown).LineStyle = xlNone Selection.Borders(xlDiagonalUp).LineStyle = xlNone With Selection.Borders(xlEdgeLeft) .LineStyle = xlContinuous .ColorIndex = 0 .TintAndShade = 0 .Weight = xlThin End With With Selection.Borders(xlEdgeTop) .LineStyle = xlContinuous .ColorIndex = 0 .TintAndShade = 0 .Weight = xlThin End With With Selection.Borders(xlEdgeBottom) .LineStyle = xlContinuous .ColorIndex = 0 .TintAndShade = 0 .Weight = xlThin End With With Selection.Borders(xlEdgeRight) .LineStyle = xlContinuous .ColorIndex = 0 .TintAndShade = 0 .Weight = xlThin End With With Selection.Borders(xlInsideVertical) .LineStyle = xlContinuous .ColorIndex = 0 .TintAndShade = 0 .Weight = xlThin End With With Selection.Borders(xlInsideHorizontal) .LineStyle = xlContinuous .ColorIndex = 0 .TintAndShade = 0 .Weight = xlThin End With Range("H10").Select End Sub