10-23-2008, 04:08 PM
This is the code
Sub NewFormat()
'
' NewFormat Macro
' Macro recorded 23/10/2008 by Fernando Pescador
'
'
Application.WindowState = xlMaximized
With ActiveWindow
.Top = 5.5
.Left = 559.75
End With
Windows("BPH 1429 (HT) 2008_10_13.xls").Activate
Sheets.Add
Sheets("Weekly Prices without taxes").Select
Range("B21:G47").Select
Selection.Copy
Sheets("Sheet1").Select
Range("B4").Select
ActiveSheet.Paste
Range("B3").Select
Application.CutCopyMode = False
Selection.Copy
Range("B4:G30").Select
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
Sheets("Weekly Prices without taxes").Select
Range("H21:J47").Select
Selection.Copy
Sheets("Sheet1").Select
Range("C4").Select
ActiveSheet.Paste
Range("C3").Select
Application.CutCopyMode = False
Selection.Copy
Range("C4:E30").Select
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
Windows("BPH 1429 (TTC) 2008_10_13.xls").Activate
Range("I21:J47").Select
Selection.Copy
Windows("BPH 1429 (HT) 2008_10_13.xls").Activate
Range("D4").Select
ActiveSheet.Paste
Range("D3").Select
Application.CutCopyMode = False
Selection.Copy
Range("D4:E30").Select
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
Sheets("Weekly Prices without taxes").Select
Range("K21:O47").Select
Selection.Copy
Sheets("Sheet1").Select
Range("E4").Select
ActiveSheet.Paste
Range("E3").Select
Application.CutCopyMode = False
Selection.Copy
Range("E4:I30").Select
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
Windows("BPH 1429 (TTC) 2008_10_13.xls").Activate
Range("K21:M47").Select
Selection.Copy
Windows("BPH 1429 (HT) 2008_10_13.xls").Activate
Range("F4").Select
ActiveSheet.Paste
Range("F3").Select
Application.CutCopyMode = False
Selection.Copy
Range("F4:H30").Select
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
Sheets("Weekly Prices without taxes").Select
Range("P21:R47").Select
Selection.Copy
Sheets("Sheet1").Select
Range("G4").Select
ActiveSheet.Paste
Range("G3").Select
Application.CutCopyMode = False
Selection.Copy
Range("G4:I30").Select
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
Windows("BPH 1429 (TTC) 2008_10_13.xls").Activate
Range("N21:O47").Select
Selection.Copy
Windows("BPH 1429 (HT) 2008_10_13.xls").Activate
Range("H4").Select
ActiveSheet.Paste
Range("H3").Select
Application.CutCopyMode = False
Selection.Copy
Range("H4:I30").Select
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
End Sub
Sub NewFormat()
'
' NewFormat Macro
' Macro recorded 23/10/2008 by Fernando Pescador
'
'
Application.WindowState = xlMaximized
With ActiveWindow
.Top = 5.5
.Left = 559.75
End With
Windows("BPH 1429 (HT) 2008_10_13.xls").Activate
Sheets.Add
Sheets("Weekly Prices without taxes").Select
Range("B21:G47").Select
Selection.Copy
Sheets("Sheet1").Select
Range("B4").Select
ActiveSheet.Paste
Range("B3").Select
Application.CutCopyMode = False
Selection.Copy
Range("B4:G30").Select
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
Sheets("Weekly Prices without taxes").Select
Range("H21:J47").Select
Selection.Copy
Sheets("Sheet1").Select
Range("C4").Select
ActiveSheet.Paste
Range("C3").Select
Application.CutCopyMode = False
Selection.Copy
Range("C4:E30").Select
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
Windows("BPH 1429 (TTC) 2008_10_13.xls").Activate
Range("I21:J47").Select
Selection.Copy
Windows("BPH 1429 (HT) 2008_10_13.xls").Activate
Range("D4").Select
ActiveSheet.Paste
Range("D3").Select
Application.CutCopyMode = False
Selection.Copy
Range("D4:E30").Select
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
Sheets("Weekly Prices without taxes").Select
Range("K21:O47").Select
Selection.Copy
Sheets("Sheet1").Select
Range("E4").Select
ActiveSheet.Paste
Range("E3").Select
Application.CutCopyMode = False
Selection.Copy
Range("E4:I30").Select
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
Windows("BPH 1429 (TTC) 2008_10_13.xls").Activate
Range("K21:M47").Select
Selection.Copy
Windows("BPH 1429 (HT) 2008_10_13.xls").Activate
Range("F4").Select
ActiveSheet.Paste
Range("F3").Select
Application.CutCopyMode = False
Selection.Copy
Range("F4:H30").Select
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
Sheets("Weekly Prices without taxes").Select
Range("P21:R47").Select
Selection.Copy
Sheets("Sheet1").Select
Range("G4").Select
ActiveSheet.Paste
Range("G3").Select
Application.CutCopyMode = False
Selection.Copy
Range("G4:I30").Select
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
Windows("BPH 1429 (TTC) 2008_10_13.xls").Activate
Range("N21:O47").Select
Selection.Copy
Windows("BPH 1429 (HT) 2008_10_13.xls").Activate
Range("H4").Select
ActiveSheet.Paste
Range("H3").Select
Application.CutCopyMode = False
Selection.Copy
Range("H4:I30").Select
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
End Sub