On 2002-09-05 09:57, peter_wcx wrote:
On 2002-09-05 09:52, Andrew Poulsom wrote:
Post the code in your recorded macro.
Here it is again...didn't get it all.....
Sub RBS_Fuel_Prices()
'
' RBS_Fuel_Prices Macro
' Macro recorded 9/4/2002 by Sharon Skoruppa
'
' Keyboard Shortcut: Ctrl+Shift+R
'
Workbooks.OpenText Filename:="F:RMSC001GAIMPRBSRACK.PRT", Origin:= _
xlWindows, StartRow:=1, DataType:=xlFixedWidth, FieldInfo:=Array(Array(0, _
1), Array(18, 1), Array(27, 1), Array(37, 1), Array(47, 1), Array(57, 1), Array(68, 1), _
Array(77, 1), Array(87, 1), Array(97, 1), Array(107, 1)), TrailingMinusNumbers:=True
Rows("1:8").Select
Selection.Delete Shift:=xlUp
Range("2:2,4:4,6:6,8:8,10:10,12:12,14:14,16:16,18:18,20:20,22:22").Select
Range("A22").Activate
Selection.Delete Shift:=xlUp
Range("13:13,15:15,17:17,19:19,21:21,23:23").Select
Range("A23").Activate
Selection.Delete Shift:=xlUp
Range("19:19,21:21").Select
Range("A21").Activate
ActiveWindow.SmallScroll Down:=11
Range("19:19,21:21,23:62").Select
Range("A23").Activate
Selection.Delete Shift:=xlUp
Columns("A:A").Select
Selection.Insert Shift:=xlToRight
Columns("A:A").Select
Selection.Delete Shift:=xlToLeft
Columns("B:C").Select
Selection.Delete Shift:=xlToLeft
Columns("E:E").Select
Selection.Delete Shift:=xlToLeft
Columns("F:H").Select
Selection.Delete Shift:=xlToLeft
Rows("3:5").Select
Selection.Insert Shift:=xlDown
Rows("7:9").Select
Selection.Insert Shift:=xlDown
Rows("11:13").Select
Selection.Insert Shift:=xlDown
ActiveWindow.SmallScroll Down:=9
Rows("15:17").Select
Selection.Insert Shift:=xlDown
Rows("19:21").Select
Selection.Insert Shift:=xlDown
Rows("23:25").Select
Selection.Insert Shift:=xlDown
Rows("27:29").Select
Selection.Insert Shift:=xlDown
Rows("31:33").Select
Selection.Insert Shift:=xlDown
ActiveWindow.SmallScroll Down:=15
Rows("35:37").Select
Selection.Insert Shift:=xlDown
Rows("39:41").Select
Selection.Insert Shift:=xlDown
Rows("43:45").Select
Selection.Insert Shift:=xlDown
Rows("47:49").Select
Selection.Insert Shift:=xlDown
Rows("51:53").Select
Selection.Insert Shift:=xlDown
ActiveWindow.SmallScroll Down:=11
Rows("55:57").Select
Selection.Insert Shift:=xlDown
Rows("59:61").Select
Selection.Insert Shift:=xlDown
Rows("63:65").Select
Selection.Insert Shift:=xlDown
Rows("67:69").Select
Selection.Insert Shift:=xlDown
ActiveWindow.SmallScroll Down:=4
Rows("71:73").Select
Selection.Insert Shift:=xlDown
ActiveWindow.ScrollRow = 49
ActiveWindow.ScrollRow = 48
ActiveWindow.ScrollRow = 44
ActiveWindow.ScrollRow = 39
ActiveWindow.ScrollRow = 35
ActiveWindow.ScrollRow = 31
ActiveWindow.ScrollRow = 27
ActiveWindow.ScrollRow = 23
ActiveWindow.ScrollRow = 19
ActiveWindow.ScrollRow = 17
ActiveWindow.ScrollRow = 16
ActiveWindow.ScrollRow = 15
ActiveWindow.ScrollRow = 14
ActiveWindow.ScrollRow = 13
ActiveWindow.ScrollRow = 11
ActiveWindow.ScrollRow = 10
ActiveWindow.ScrollRow = 9
ActiveWindow.ScrollRow = 8
ActiveWindow.ScrollRow = 7
ActiveWindow.ScrollRow = 6
ActiveWindow.ScrollRow = 5
ActiveWindow.ScrollRow = 4
ActiveWindow.ScrollRow = 3
ActiveWindow.ScrollRow = 2
ActiveWindow.ScrollRow = 1
Range("C2").Select
Selection.Cut
Range("B3").Select
ActiveSheet.Paste
Range("D2").Select
Selection.Cut
Range("B4").Select
ActiveSheet.Paste
Range("E2").Select
Selection.Cut
Range("B5").Select
ActiveSheet.Paste
Range("C6").Select
Selection.Cut
Range("B7").Select
ActiveSheet.Paste
Range("D6").Select
Selection.Cut
Range("B8").Select
ActiveSheet.Paste
Range("E6").Select
Selection.Cut
Range("B9").Select
ActiveSheet.Paste
Range("C10").Select
Selection.Cut
Range("B11").Select
ActiveSheet.Paste
Range("D10").Select
Selection.Cut
Range("B12").Select
ActiveSheet.Paste
Range("E10").Select
Selection.Cut
Range("B13").Select
ActiveSheet.Paste
Range("C14").Select
Selection.Cut
Range("B15").Select
ActiveSheet.Paste
Range("D14").Select
Selection.Cut
Range("B16").Select
ActiveSheet.Paste
Range("E14").Select
Selection.Cut
Range("B17").Select
ActiveSheet.Paste
ActiveWindow.ScrollRow = 2
ActiveWindow.ScrollRow = 3
ActiveWindow.ScrollRow = 4
ActiveWindow.ScrollRow = 5
ActiveWindow.ScrollRow = 6
ActiveWindow.ScrollRow = 7
ActiveWindow.ScrollRow = 8
ActiveWindow.ScrollRow = 9
ActiveWindow.ScrollRow = 10
ActiveWindow.ScrollRow = 11
ActiveWindow.ScrollRow = 12
Range("C18").Select
Selection.Cut
Range("B19").Select
ActiveSheet.Paste
Range("D18").Select
Selection.Cut
Range("B20").Select
ActiveSheet.Paste
Range("E18").Select
Selection.Cut
Range("B21").Select
ActiveSheet.Paste
Range("C22").Select
Selection.Cut
Range("B23").Select
ActiveSheet.Paste
Range("D22").Select
Selection.Cut
Range("B24").Select
ActiveSheet.Paste
Range("E22").Select
Selection.Cut
Range("B25").Select
ActiveSheet.Paste
Range("C26").Select
Selection.Cut
Range("B27").Select
ActiveSheet.Paste
Range("D26").Select
Selection.Cut
Range("B28").Select
ActiveSheet.Paste
Range("E26").Select
Selection.Cut
Range("B29").Select
ActiveSheet.Paste
ActiveWindow.ScrollRow = 13
ActiveWindow.ScrollRow = 14
ActiveWindow.ScrollRow = 15
ActiveWindow.ScrollRow = 16
ActiveWindow.ScrollRow = 17
ActiveWindow.ScrollRow = 18
ActiveWindow.ScrollRow = 19
ActiveWindow.ScrollRow = 20
ActiveWindow.ScrollRow = 21
ActiveWindow.ScrollRow = 22
ActiveWindow.ScrollRow = 23
ActiveWindow.ScrollRow = 24
ActiveWindow.ScrollRow = 25
ActiveWindow.ScrollRow = 26
Range("C30").Select
Selection.Cut
Range("B31").Select
ActiveSheet.Paste
Range("D30").Select
Selection.Cut
Range("B32").Select
ActiveSheet.Paste
Range("E30").Select
Selection.Cut
Range("B33").Select
ActiveSheet.Paste
Range("C34").Select
Selection.Cut
Range("B35").Select
ActiveSheet.Paste
Range("D34").Select
Selection.Cut
Range("B36").Select
ActiveSheet.Paste
Range("E34").Select
Selection.Cut
Range("B37").Select
ActiveSheet.Paste
Range("C38").Select
Selection.Cut
Range("B39").Select
ActiveSheet.Paste
Range("D38").Select
Selection.Cut
Range("B40").Select
ActiveSheet.Paste
Range("E38").Select
Selection.Cut
Range("B41").Select
ActiveSheet.Paste
Range("C42").Select
Selection.Cut
Range("B43").Select
ActiveSheet.Paste
Range("D42").Select
Selection.Cut
Range("B44").Select
ActiveSheet.Paste
Range("E42").Select
Selection.Cut
Range("B45").Select
ActiveSheet.Paste
ActiveWindow.ScrollRow = 27
ActiveWindow.ScrollRow = 28
ActiveWindow.ScrollRow = 30
ActiveWindow.ScrollRow = 31
ActiveWindow.ScrollRow = 33
ActiveWindow.ScrollRow = 34
ActiveWindow.ScrollRow = 35
ActiveWindow.ScrollRow = 36
ActiveWindow.ScrollRow = 37
ActiveWindow.ScrollRow = 38
ActiveWindow.ScrollRow = 39
ActiveWindow.ScrollRow = 40
ActiveWindow.ScrollRow = 41
Range("C46").Select
Selection.Cut
Range("B47").Select
ActiveSheet.Paste
Range("D46").Select
Selection.Cut
Range("B48").Select
ActiveSheet.Paste
Range("E46").Select
Selection.Cut
Range("B49").Select
ActiveSheet.Paste
Range("C50").Select
Selection.Cut
Range("B51").Select
ActiveSheet.Paste
Range("D50").Select
Selection.Cut
Range("B52").Select
ActiveSheet.Paste
Range("E50").Select
Selection.Cut
Range("B53").Select
ActiveSheet.Paste
Range("C54").Select
Selection.Cut
Range("B55").Select
ActiveSheet.Paste
Range("D54").Select
Selection.Cut
Range("B56").Select
ActiveSheet.Paste
Range("E54").Select
Selection.Cut
Range("B57").Select
ActiveSheet.Paste
Range("C58").Select
Selection.Cut
Range("B59").Select
ActiveSheet.Paste
Range("D58").Select
Selection.Cut
Range("B60").Select
ActiveSheet.Paste
Range("E58").Select
Selection.Cut
Range("B61").Select
ActiveSheet.Paste
ActiveWindow.ScrollRow = 42
ActiveWindow.ScrollRow = 43
ActiveWindow.ScrollRow = 44
ActiveWindow.ScrollRow = 45
ActiveWindow.ScrollRow = 46
ActiveWindow.ScrollRow = 47
ActiveWindow.ScrollRow = 48
ActiveWindow.ScrollRow = 49
ActiveWindow.ScrollRow = 50
ActiveWindow.ScrollRow = 51
ActiveWindow.ScrollRow = 52
Range("C62").Select
Selection.Cut
Range("B63").Select
ActiveSheet.Paste
Range("D62").Select
Selection.Cut
Range("B64").Select
ActiveSheet.Paste
Range("E62").Select
Selection.Cut
Range("B65").Select
ActiveSheet.Paste
Range("C66").Select
Selection.Cut
Range("B67").Select
ActiveSheet.Paste
Range("D66").Select
Selection.Cut
Range("B68").Select
ActiveSheet.Paste
Range("E66").Select
Selection.Cut
Range("B69").Select
ActiveSheet.Paste
Range("C70").Select
Selection.Cut
Range("B71").Select
ActiveSheet.Paste
Range("D70").Select
Selection.Cut
Range("B72").Select
ActiveSheet.Paste
Range("E70").Select
Selection.Cut
Range("B73").Select
ActiveSheet.Paste
ActiveWindow.SmallScroll Down:=6
Range("C74").Select
Selection.Cut
Range("B75").Select
ActiveSheet.Paste
Range("D74").Select
Selection.Cut
Range("B76").Select
ActiveSheet.Paste
Range("E74").Select
Selection.Cut
Range("B77").Select
ActiveSheet.Paste
ActiveWindow.ScrollRow = 57
ActiveWindow.ScrollRow = 56
ActiveWindow.ScrollRow = 55
ActiveWindow.ScrollRow = 54
ActiveWindow.ScrollRow = 53
ActiveWindow.ScrollRow = 52
ActiveWindow.ScrollRow = 49
ActiveWindow.ScrollRow = 46
ActiveWindow.ScrollRow = 45
ActiveWindow.ScrollRow = 44
ActiveWindow.ScrollRow = 43
ActiveWindow.ScrollRow = 42
ActiveWindow.ScrollRow = 41
ActiveWindow.ScrollRow = 40
ActiveWindow.ScrollRow = 38
ActiveWindow.ScrollRow = 37
ActiveWindow.ScrollRow = 35
ActiveWindow.ScrollRow = 33
ActiveWindow.ScrollRow = 32
ActiveWindow.ScrollRow = 30
ActiveWindow.ScrollRow = 27
ActiveWindow.ScrollRow = 26
ActiveWindow.ScrollRow = 25
ActiveWindow.ScrollRow = 24
ActiveWindow.ScrollRow = 23
ActiveWindow.ScrollRow = 22
ActiveWindow.ScrollRow = 21
ActiveWindow.ScrollRow = 20
ActiveWindow.ScrollRow = 19
ActiveWindow.ScrollRow = 18
ActiveWindow.ScrollRow = 17
ActiveWindow.ScrollRow = 16
ActiveWindow.ScrollRow = 15
ActiveWindow.ScrollRow = 14
ActiveWindow.ScrollRow = 13
ActiveWindow.ScrollRow = 12
ActiveWindow.ScrollRow = 11
ActiveWindow.ScrollRow = 10
ActiveWindow.ScrollRow = 9
ActiveWindow.ScrollRow = 8
ActiveWindow.ScrollRow = 7
ActiveWindow.ScrollRow = 6
ActiveWindow.ScrollRow = 5
ActiveWindow.ScrollRow = 4
ActiveWindow.ScrollRow = 1
Range("C1:E1").Select
Selection.ClearContents
Columns("A:A").Select
Selection.Insert Shift:=xlToRight
Rows("1:1").Select
Selection.Delete Shift:=xlUp
Range("A1").Select
ActiveCell.FormulaR1C1 = "9900"
Range("A1:B1").Select
Selection.AutoFill Destination:=Range("A1:B4"), Type:=xlFillDefault
Range("A1:B4").Select
Range("A2").Select
ActiveCell.FormulaR1C1 = "9900"
Range("A1:A2").Select
Selection.AutoFill Destination:=Range("A1:A4")
Range("A1:A4").Select
Range("B5").Select
Selection.AutoFill Destination:=Range("B5:B8"), Type:=xlFillDefault
Range("B5:B8").Select
Range("B9").Select
Selection.AutoFill Destination:=Range("B9:B12"), Type:=xlFillDefault
Range("B9:B12").Select
Range("B13").Select
Selection.AutoFill Destination:=Range("B13:B16"), Type:=xlFillDefault
Range("B13:B16").Select
Range("B17").Select
Selection.AutoFill Destination:=Range("B17:B20"), Type:=xlFillDefault
Range("B17:B20").Select
Range("B21").Select
Selection.AutoFill Destination:=Range("B21:B23"), Type:=xlFillDefault
Range("B21:B23").Select
ActiveWindow.SmallScroll Down:=11
Selection.AutoFill Destination:=Range("B21:B24"), Type:=xlFillDefault
Range("B21:B24").Select
Range("B25").Select
Selection.AutoFill Destination:=Range("B25:B28"), Type:=xlFillDefault
Range("B25:B28").Select
Range("B29").Select
Selection.AutoFill Destination:=Range("B29:B32")
Range("B29:B32").Select
ActiveWindow.SmallScroll Down:=9
Range("B33").Select
Selection.AutoFill Destination:=Range("B33:B36")
Range("B33:B36").Select
Range("B37").Select
Selection.AutoFill Destination:=Range("B37:B40")
Range("B37:B40").Select
Range("B41").Select
Selection.AutoFill Destination:=Range("B41:B44")
Range("B41:B44").Select
ActiveWindow.SmallScroll Down:=18
Range("B45").Select
Selection.AutoFill Destination:=Range("B45:B48")
Range("B45:B48").Select
Range("B49").Select
Selection.AutoFill Destination:=Range("B49:B52")
Range("B49:B52").Select
Range("B53").Select
Selection.AutoFill Destination:=Range("B53:B56")
Range("B53:B56").Select
Range("B57").Select
Selection.AutoFill Destination:=Range("B57:B60")
Range("B57:B60").Select
ActiveWindow.SmallScroll Down:=17
Range("B61").Select
Selection.AutoFill Destination:=Range("B61:B64")
Range("B61:B64").Select
Range("B65").Select
Selection.AutoFill Destination:=Range("B65:B68")
Range("B65:B68").Select
Range("B69").Select
Selection.AutoFill Destination:=Range("B69:B72")
Range("B69:B72").Select
Range("B73").Select
Selection.AutoFill Destination:=Range("B73:B76")
Range("B73:B76").Select
ActiveWindow.ScrollRow = 55
ActiveWindow.ScrollRow = 54
ActiveWindow.ScrollRow = 51
ActiveWindow.ScrollRow = 49
ActiveWindow.ScrollRow = 46
ActiveWindow.ScrollRow = 43
ActiveWindow.ScrollRow = 40
ActiveWindow.ScrollRow = 37
ActiveWindow.ScrollRow = 34
ActiveWindow.ScrollRow = 30
ActiveWindow.ScrollRow = 27
ActiveWindow.ScrollRow = 23
ActiveWindow.ScrollRow = 19
ActiveWindow.ScrollRow = 16
ActiveWindow.ScrollRow = 12
ActiveWindow.ScrollRow = 8
ActiveWindow.ScrollRow = 6
ActiveWindow.ScrollRow = 3
ActiveWindow.ScrollRow = 1
Range("A2:A4").Select
Selection.AutoFill Destination:=Range("A2:A76")
Range("A2:A76").Select
Columns("C:C").Select
Selection.Insert Shift:=xlToRight
Range("C1").Select
ActiveCell.FormulaR1C1 = "200"
Range("C2").Select
ActiveCell.FormulaR1C1 = "200"
Range("C1:C2").Select
Selection.AutoFill Destination:=Range("C1:C76")
Range("C1:C76").Select
Columns("D:D").Select
Selection.Insert Shift:=xlToRight
Range("D1").Select
ActiveCell.FormulaR1C1 = "PRM"
Range("D2").Select
ActiveCell.FormulaR1C1 = "MID"
Range("D3").Select
ActiveCell.FormulaR1C1 = "UNL"
Range("D4").Select
ActiveCell.FormulaR1C1 = "DSL"
Range("D1:D4").Select
Selection.AutoFill Destination:=Range("D1:D76")
Range("D1:D76").Select
Columns("E:F").Select
Selection.Insert Shift:=xlToRight
Range("E1").Select
Range("F1").Select
ActiveCell.FormulaR1C1 = "0"
Range("F1").Select
Selection.Copy
Range("F2").Select
ActiveSheet.Paste
Range("F1:F2").Select
Application.CutCopyMode = False
Range("F1:F2").Select
Selection.AutoFill Destination:=Range("F1:F76")
Range("F1:F76").Select
ActiveWindow.ScrollRow = 2
ActiveWindow.ScrollRow = 3
ActiveWindow.ScrollRow = 5
ActiveWindow.ScrollRow = 7
ActiveWindow.ScrollRow = 10
ActiveWindow.ScrollRow = 13
ActiveWindow.ScrollRow = 16
ActiveWindow.ScrollRow = 19
ActiveWindow.ScrollRow = 22
ActiveWindow.ScrollRow = 24
ActiveWindow.ScrollRow = 27
ActiveWindow.ScrollRow = 30
ActiveWindow.ScrollRow = 32
ActiveWindow.ScrollRow = 36
ActiveWindow.ScrollRow = 38
ActiveWindow.ScrollRow = 40
ActiveWindow.ScrollRow = 43
ActiveWindow.ScrollRow = 45
ActiveWindow.ScrollRow = 47
ActiveWindow.ScrollRow = 49
ActiveWindow.ScrollRow = 51
ActiveWindow.ScrollRow = 54
ActiveWindow.ScrollRow = 51
ActiveWindow.ScrollRow = 49
ActiveWindow.ScrollRow = 46
ActiveWindow.ScrollRow = 43
ActiveWindow.ScrollRow = 41
ActiveWindow.ScrollRow = 39
ActiveWindow.ScrollRow = 36
ActiveWindow.ScrollRow = 34
ActiveWindow.ScrollRow = 32
ActiveWindow.ScrollRow = 29
ActiveWindow.ScrollRow = 27
ActiveWindow.ScrollRow = 24
ActiveWindow.ScrollRow = 22
ActiveWindow.ScrollRow = 19
ActiveWindow.ScrollRow = 16
ActiveWindow.ScrollRow = 14
ActiveWindow.ScrollRow = 11
ActiveWindow.ScrollRow = 9
ActiveWindow.ScrollRow = 6
ActiveWindow.ScrollRow = 3
ActiveWindow.ScrollRow = 1
End Sub