variable number of rows.

K

krigger228

I have created this macro but it cuts off if I have too many rows. Is there a
way to make it run until it hits a blank cell in another column? Here is the
code I have now.

feel free to e-mail me if you need more information.

Sub Macro7()
'
' Macro7 Macro
'

'
Columns("I:I").Select
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
Columns("H:H").EntireColumn.AutoFit
Range("I2").Select
ActiveCell.FormulaR1C1 = _
"=IF(RC[-8]=RC[-1],""Goto_View"",""Goto_View_External"")"
Range("I2").Select
Selection.Copy
Range("H2").Select
Selection.End(xlDown).Select
Range("I60487").Select
Range(Selection, Selection.End(xlUp)).Select
ActiveSheet.Paste
Range("A60486").Select
Selection.End(xlUp).Select
Range("I1").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "ACTION"
Range("I1").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
ActiveWindow.ScrollRow = 60216
ActiveWindow.ScrollRow = 59474
ActiveWindow.ScrollRow = 57743
ActiveWindow.ScrollRow = 55270
ActiveWindow.ScrollRow = 51561
ActiveWindow.ScrollRow = 47109
ActiveWindow.ScrollRow = 42658
ActiveWindow.ScrollRow = 38578
ActiveWindow.ScrollRow = 34869
ActiveWindow.ScrollRow = 31407
ActiveWindow.ScrollRow = 28068
ActiveWindow.ScrollRow = 25101
ActiveWindow.ScrollRow = 23122
ActiveWindow.ScrollRow = 20402
ActiveWindow.ScrollRow = 18919
ActiveWindow.ScrollRow = 17558
ActiveWindow.ScrollRow = 16198
ActiveWindow.ScrollRow = 14838
ActiveWindow.ScrollRow = 13602
ActiveWindow.ScrollRow = 12365
ActiveWindow.ScrollRow = 11376
ActiveWindow.ScrollRow = 10263
ActiveWindow.ScrollRow = 9522
ActiveWindow.ScrollRow = 8409
ActiveWindow.ScrollRow = 7667
ActiveWindow.ScrollRow = 6801
ActiveWindow.ScrollRow = 5936
ActiveWindow.ScrollRow = 4699
ActiveWindow.ScrollRow = 3216
ActiveWindow.ScrollRow = 1732
ActiveWindow.ScrollRow = 372
ActiveWindow.ScrollRow = 1
Range("E1").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Columns("I:I").Select
Application.CutCopyMode = False
Selection.Delete Shift:=xlToLeft
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
Range("I2").Select
ActiveCell.FormulaR1C1 = "=IF(RC[-4]=""Goto_View"","""",RC[-1])"
Range("I2").Select
Selection.Copy
Range("H2").Select
Selection.End(xlDown).Select
Range("I60487").Select
Range(Selection, Selection.End(xlUp)).Select
ActiveSheet.Paste
Selection.End(xlUp).Select
Range("I1").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "DEST. FILE"
Range("I1").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Selection.End(xlUp).Select
Range("H1").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
ActiveWindow.SmallScroll Down:=9
Range("H1").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Columns("I:I").Select
Application.CutCopyMode = False
Selection.Delete Shift:=xlToLeft
ActiveWindow.LargeScroll ToRight:=1
Columns("W:W").Select
Selection.Cut
ActiveWindow.LargeScroll ToRight:=-1
Columns("A:A").Select
ActiveSheet.Paste
ActiveWindow.LargeScroll ToRight:=1
Range("T2").Select
Selection.Copy
Columns("T:T").Select
Selection.Replace What:="ACROBAT_DEFAULT", Replacement:="NEW_WINDOW", _
LookAt:=xlPart, SearchOrder:=xlByRows, MatchCase:=False,
SearchFormat:= _
False, ReplaceFormat:=False
Range("T3").Select
Application.CutCopyMode = False
Range("T1").Select
ActiveWindow.LargeScroll ToRight:=-1
Range("A1").Select
Selection.End(xlDown).Select
Range("A1").Select
Selection.End(xlDown).Select
Rows("60488:60488").Select
Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
Columns("A:A").Select
Selection.SpecialCells(xlCellTypeBlanks).Select
Range(Selection, ActiveCell.SpecialCells(xlLastCell)).Select
Selection.ClearContents
Range("A1").Select
End Sub
 
J

Joel

It is hard to fix code like this. Her is a much improved macro. I made of
made a fgew mistakes but you should easily be able to fix the problems.


Sub Macro7()
'
' Macro7 Macro
'

'
Columns("I:I").Insert Shift:=xlToRight,
CopyOrigin:=xlFormatFromLeftOrAbove
Columns("H:H").EntireColumn.AutoFit
Range("I2").FormulaR1C1 = _
"=IF(RC[-8]=RC[-1],""Goto_View"",""Goto_View_External"")"
LastRow = Range("I" & rows.count).end(xlup).Row

Range("I2").Copy Destination:=Range("H2:H" & Lastrow)

Range("I1").Copy
Range("E1:E" & LastRow).PasteSpecial _
Paste:=xlPasteValues

Columns("I:I").Delete
Application.CutCopyMode = False
Columns("I:I").Insert Shift:=xlToRight,
CopyOrigin:=xlFormatFromLeftOrAbove

Range("I2").FormulaR1C1 = "=IF(RC[-4]=""Goto_View"","""",RC[-1])"
Range("I2").Copy Destination:=Range("H2:H" & LastRow)

Range("I1:I" & LastRow).FormulaR1C1 = "DEST. FILE"

Range("H1").copy destination:=Range("H1:H" & LastRow)

Columns("I:I").Delete

Columns("W:W").Cut
Columns("A:A").Paste

Columns("T:T").Replace _
What:="ACROBAT_DEFAULT", _
Replacement:="NEW_WINDOW", _
LookAt:=xlPart

Rows(Lastrow).Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove

set FirstBlankCell = Columns("A:A").SpecialCells(xlCellTypeBlanks)
set LastCell = ActiveCell.SpecialCells(xlLastCell)
Range(FirstBlankCell, LastCell).ClearContents
End Sub


krigger228 said:
I have created this macro but it cuts off if I have too many rows. Is there a
way to make it run until it hits a blank cell in another column? Here is the
code I have now.

feel free to e-mail me if you need more information.

Sub Macro7()
'
' Macro7 Macro
'

'
Columns("I:I").Select
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
Columns("H:H").EntireColumn.AutoFit
Range("I2").Select
ActiveCell.FormulaR1C1 = _
"=IF(RC[-8]=RC[-1],""Goto_View"",""Goto_View_External"")"
Range("I2").Select
Selection.Copy
Range("H2").Select
Selection.End(xlDown).Select
Range("I60487").Select
Range(Selection, Selection.End(xlUp)).Select
ActiveSheet.Paste
Range("A60486").Select
Selection.End(xlUp).Select
Range("I1").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "ACTION"
Range("I1").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
ActiveWindow.ScrollRow = 60216
ActiveWindow.ScrollRow = 59474
ActiveWindow.ScrollRow = 57743
ActiveWindow.ScrollRow = 55270
ActiveWindow.ScrollRow = 51561
ActiveWindow.ScrollRow = 47109
ActiveWindow.ScrollRow = 42658
ActiveWindow.ScrollRow = 38578
ActiveWindow.ScrollRow = 34869
ActiveWindow.ScrollRow = 31407
ActiveWindow.ScrollRow = 28068
ActiveWindow.ScrollRow = 25101
ActiveWindow.ScrollRow = 23122
ActiveWindow.ScrollRow = 20402
ActiveWindow.ScrollRow = 18919
ActiveWindow.ScrollRow = 17558
ActiveWindow.ScrollRow = 16198
ActiveWindow.ScrollRow = 14838
ActiveWindow.ScrollRow = 13602
ActiveWindow.ScrollRow = 12365
ActiveWindow.ScrollRow = 11376
ActiveWindow.ScrollRow = 10263
ActiveWindow.ScrollRow = 9522
ActiveWindow.ScrollRow = 8409
ActiveWindow.ScrollRow = 7667
ActiveWindow.ScrollRow = 6801
ActiveWindow.ScrollRow = 5936
ActiveWindow.ScrollRow = 4699
ActiveWindow.ScrollRow = 3216
ActiveWindow.ScrollRow = 1732
ActiveWindow.ScrollRow = 372
ActiveWindow.ScrollRow = 1
Range("E1").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Columns("I:I").Select
Application.CutCopyMode = False
Selection.Delete Shift:=xlToLeft
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
Range("I2").Select
ActiveCell.FormulaR1C1 = "=IF(RC[-4]=""Goto_View"","""",RC[-1])"
Range("I2").Select
Selection.Copy
Range("H2").Select
Selection.End(xlDown).Select
Range("I60487").Select
Range(Selection, Selection.End(xlUp)).Select
ActiveSheet.Paste
Selection.End(xlUp).Select
Range("I1").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "DEST. FILE"
Range("I1").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Selection.End(xlUp).Select
Range("H1").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
ActiveWindow.SmallScroll Down:=9
Range("H1").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Columns("I:I").Select
Application.CutCopyMode = False
Selection.Delete Shift:=xlToLeft
ActiveWindow.LargeScroll ToRight:=1
Columns("W:W").Select
Selection.Cut
ActiveWindow.LargeScroll ToRight:=-1
Columns("A:A").Select
ActiveSheet.Paste
ActiveWindow.LargeScroll ToRight:=1
Range("T2").Select
Selection.Copy
Columns("T:T").Select
Selection.Replace What:="ACROBAT_DEFAULT", Replacement:="NEW_WINDOW", _
LookAt:=xlPart, SearchOrder:=xlByRows, MatchCase:=False,
SearchFormat:= _
False, ReplaceFormat:=False
Range("T3").Select
Application.CutCopyMode = False
Range("T1").Select
ActiveWindow.LargeScroll ToRight:=-1
Range("A1").Select
Selection.End(xlDown).Select
Range("A1").Select
Selection.End(xlDown).Select
Rows("60488:60488").Select
Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
Columns("A:A").Select
Selection.SpecialCells(xlCellTypeBlanks).Select
Range(Selection, ActiveCell.SpecialCells(xlLastCell)).Select
Selection.ClearContents
Range("A1").Select
End Sub
 
S

Simon Lloyd

You would be better off explaining what you are trying to do, there i
so much un needed code there and far too many selects, i have shortene
the code but i don't know what you are trying to achieve as you als
perform needless actions, we could do with seeing you workbook with a
explanation of what you want to do, here's the shortened code, it can b
made smaller
Code
-------------------
Sub Macro7(

' Macro7 Macr


Columns("I:I").Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbov
Columns("H:H").EntireColumn.AutoFi
Range("I2").ActiveCell.FormulaR1C1 =
"=IF(RC[-8]=RC[-1],""Goto_View"",""Goto_View_External"")
Range("I2").Cop
Range("I60487").Selec
Range(Selection, Selection.End(xlUp)).Selec
ActiveSheet.Past
Range("I1").Selec
Application.CutCopyMode = Fals
ActiveCell.FormulaR1C1 = "ACTION
Range("I1").Selec
Range(Selection, Selection.End(xlDown)).Cop
Range("E1").Selec
Range(Selection, Selection.End(xlDown)).Selec
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks
:=False, Transpose:=Fals
Columns("I:I").Delete Shift:=xlToLef
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbov
Range("I2").FormulaR1C1 = "=IF(RC[-4]=""Goto_View"","""",RC[-1])
Selection.Cop
Range("H2").Selec
Selection.End(xlDown).Selec
Range("I60487").Selec
Range(Selection, Selection.End(xlUp)).Selec
ActiveSheet.Past
Selection.End(xlUp).Selec
Range("I1").FormulaR1C1 = "DEST. FILE
Range("I1").Selec
Range(Selection, Selection.End(xlDown)).Selec
Selection.Cop
Selection.End(xlUp).Selec
Range("H1").Selec
Range(Selection, Selection.End(xlDown)).Selec
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks
:=False, Transpose:=Fals
Columns("I:I").Delete Shift:=xlToLef
Columns("W:W").Cu
Columns("A:A").Past
Range("T2").Cop
Columns("T:T").Selec
Selection.Replace What:="ACROBAT_DEFAULT", Replacement:="NEW_WINDOW",
LookAt:=xlPart, SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=
False, ReplaceFormat:=Fals
Rows("60488:60488").Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbov
Columns("A:A").SpecialCells(xlCellTypeBlanks).Selec
Range(Selection, ActiveCell.SpecialCells(xlLastCell)).Selec
Selection.ClearContent
Range("A1").Selec
Application.CutCopyMode = Fals
End Su
-------------------
krigger228;248740 said:
I have created this macro but it cuts off if I have too many rows. I
there
way to make it run until it hits a blank cell in another column? Her
is th
code I have now

feel free to e-mail me if you need more information
Code
-------------------Sub Macro7(

' Macro7 Macr



Columns("I:I").Selec
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbov
Columns("H:H").EntireColumn.AutoFi
Range("I2").Selec
ActiveCell.FormulaR1C1 =
"=IF(RC[-8]=RC[-1],""Goto_View"",""Goto_View_External"")
Range("I2").Selec
Selection.Cop
Range("H2").Selec
Selection.End(xlDown).Selec
Range("I60487").Selec
Range(Selection, Selection.End(xlUp)).Selec
ActiveSheet.Past
Range("A60486").Selec
Selection.End(xlUp).Selec
Range("I1").Selec
Application.CutCopyMode = Fals
ActiveCell.FormulaR1C1 = "ACTION
Range("I1").Selec
Range(Selection, Selection.End(xlDown)).Selec
Selection.Cop
ActiveWindow.ScrollRow = 6021
ActiveWindow.ScrollRow = 5947
ActiveWindow.ScrollRow = 5774
ActiveWindow.ScrollRow = 5527
ActiveWindow.ScrollRow = 5156
ActiveWindow.ScrollRow = 4710
ActiveWindow.ScrollRow = 4265
ActiveWindow.ScrollRow = 3857
ActiveWindow.ScrollRow = 3486
ActiveWindow.ScrollRow = 3140
ActiveWindow.ScrollRow = 2806
ActiveWindow.ScrollRow = 2510
ActiveWindow.ScrollRow = 2312
ActiveWindow.ScrollRow = 2040
ActiveWindow.ScrollRow = 1891
ActiveWindow.ScrollRow = 1755
ActiveWindow.ScrollRow = 1619
ActiveWindow.ScrollRow = 14838
ActiveWindow.ScrollRow = 13602
ActiveWindow.ScrollRow = 12365
ActiveWindow.ScrollRow = 11376
ActiveWindow.ScrollRow = 10263
ActiveWindow.ScrollRow = 9522
ActiveWindow.ScrollRow = 8409
ActiveWindow.ScrollRow = 7667
ActiveWindow.ScrollRow = 6801
ActiveWindow.ScrollRow = 5936
ActiveWindow.ScrollRow = 4699
ActiveWindow.ScrollRow = 3216
ActiveWindow.ScrollRow = 1732
ActiveWindow.ScrollRow = 372
ActiveWindow.ScrollRow = 1
Range("E1").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Columns("I:I").Select
Application.CutCopyMode = False
Selection.Delete Shift:=xlToLeft
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
Range("I2").Select
ActiveCell.FormulaR1C1 = "=IF(RC[-4]=""Goto_View"","""",RC[-1])"
Range("I2").Select
Selection.Copy
Range("H2").Select
Selection.End(xlDown).Select
Range("I60487").Select
Range(Selection, Selection.End(xlUp)).Select
ActiveSheet.Paste
Selection.End(xlUp).Select
Range("I1").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "DEST. FILE"
Range("I1").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Selection.End(xlUp).Select
Range("H1").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
ActiveWindow.SmallScroll Down:=9
Range("H1").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Columns("I:I").Select
Application.CutCopyMode = False
Selection.Delete Shift:=xlToLeft
ActiveWindow.LargeScroll ToRight:=1
Columns("W:W").Select
Selection.Cut
ActiveWindow.LargeScroll ToRight:=-1
Columns("A:A").Select
ActiveSheet.Paste
ActiveWindow.LargeScroll ToRight:=1
Range("T2").Select
Selection.Copy
Columns("T:T").Select
Selection.Replace What:="ACROBAT_DEFAULT", Replacement:="NEW_WINDOW", _
LookAt:=xlPart, SearchOrder:=xlByRows, MatchCase:=False,
SearchFormat:= _
False, ReplaceFormat:=False
Range("T3").Select
Application.CutCopyMode = False
Range("T1").Select
ActiveWindow.LargeScroll ToRight:=-1
Range("A1").Select
Selection.End(xlDown).Select
Range("A1").Select
Selection.End(xlDown).Select
Rows("60488:60488").Select
Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
Columns("A:A").Select
Selection.SpecialCells(xlCellTypeBlanks).Select
Range(Selection, ActiveCell.SpecialCells(xlLastCell)).Select
Selection.ClearContents
Range("A1").Select
End Sub
--------------------


--
Simon Lloyd

Regards,
Simon Lloyd
'The Code Cage' (http://www.thecodecage.com)
 
J

Joel

I wouldn't recoomend using the Select method. It is slow and is hard to
read. Look at my code, it is the recoomended way of coding. the macro
recorder code is very cumbersome. I always mdoify any code that I use that
comes from the macro recorder.

Simon Lloyd said:
You would be better off explaining what you are trying to do, there is
so much un needed code there and far too many selects, i have shortened
the code but i don't know what you are trying to achieve as you also
perform needless actions, we could do with seeing you workbook with an
explanation of what you want to do, here's the shortened code, it can be
made smaller:
Code:
--------------------
Sub Macro7()
'
' Macro7 Macro
'
'
Columns("I:I").Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
Columns("H:H").EntireColumn.AutoFit
Range("I2").ActiveCell.FormulaR1C1 = _
"=IF(RC[-8]=RC[-1],""Goto_View"",""Goto_View_External"")"
Range("I2").Copy
Range("I60487").Select
Range(Selection, Selection.End(xlUp)).Select
ActiveSheet.Paste
Range("I1").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "ACTION"
Range("I1").Select
Range(Selection, Selection.End(xlDown)).Copy
Range("E1").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Columns("I:I").Delete Shift:=xlToLeft
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
Range("I2").FormulaR1C1 = "=IF(RC[-4]=""Goto_View"","""",RC[-1])"
Selection.Copy
Range("H2").Select
Selection.End(xlDown).Select
Range("I60487").Select
Range(Selection, Selection.End(xlUp)).Select
ActiveSheet.Paste
Selection.End(xlUp).Select
Range("I1").FormulaR1C1 = "DEST. FILE"
Range("I1").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Selection.End(xlUp).Select
Range("H1").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Columns("I:I").Delete Shift:=xlToLeft
Columns("W:W").Cut
Columns("A:A").Paste
Range("T2").Copy
Columns("T:T").Select
Selection.Replace What:="ACROBAT_DEFAULT", Replacement:="NEW_WINDOW", _
LookAt:=xlPart, SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:= _
False, ReplaceFormat:=False
Rows("60488:60488").Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
Columns("A:A").SpecialCells(xlCellTypeBlanks).Select
Range(Selection, ActiveCell.SpecialCells(xlLastCell)).Select
Selection.ClearContents
Range("A1").Select
Application.CutCopyMode = False
End Sub
--------------------
krigger228;248740 said:
I have created this macro but it cuts off if I have too many rows. Is
there a
way to make it run until it hits a blank cell in another column? Here
is the
code I have now.

feel free to e-mail me if you need more information.
Code:
--------------------Sub Macro7()
'
' Macro7 Macro
'

'
Columns("I:I").Select
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
Columns("H:H").EntireColumn.AutoFit
Range("I2").Select
ActiveCell.FormulaR1C1 = _
"=IF(RC[-8]=RC[-1],""Goto_View"",""Goto_View_External"")"
Range("I2").Select
Selection.Copy
Range("H2").Select
Selection.End(xlDown).Select
Range("I60487").Select
Range(Selection, Selection.End(xlUp)).Select
ActiveSheet.Paste
Range("A60486").Select
Selection.End(xlUp).Select
Range("I1").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "ACTION"
Range("I1").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
ActiveWindow.ScrollRow = 60216
ActiveWindow.ScrollRow = 59474
ActiveWindow.ScrollRow = 57743
ActiveWindow.ScrollRow = 55270
ActiveWindow.ScrollRow = 51561
ActiveWindow.ScrollRow = 47109
ActiveWindow.ScrollRow = 42658
ActiveWindow.ScrollRow = 38578
ActiveWindow.ScrollRow = 34869
ActiveWindow.ScrollRow = 31407
ActiveWindow.ScrollRow = 28068
ActiveWindow.ScrollRow = 25101
ActiveWindow.ScrollRow = 23122
ActiveWindow.ScrollRow = 20402
ActiveWindow.ScrollRow = 18919
ActiveWindow.ScrollRow = 17558
ActiveWindow.ScrollRow = 16198
ActiveWindow.ScrollRow = 14838
ActiveWindow.ScrollRow = 13602
ActiveWindow.ScrollRow = 12365
ActiveWindow.ScrollRow = 11376
ActiveWindow.ScrollRow = 10263
ActiveWindow.ScrollRow = 9522
ActiveWindow.ScrollRow = 8409
ActiveWindow.ScrollRow = 7667
ActiveWindow.ScrollRow = 6801
ActiveWindow.ScrollRow = 5936
ActiveWindow.ScrollRow = 4699
ActiveWindow.ScrollRow = 3216
ActiveWindow.ScrollRow = 1732
ActiveWindow.ScrollRow = 372
ActiveWindow.ScrollRow = 1
Range("E1").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Columns("I:I").Select
Application.CutCopyMode = False
Selection.Delete Shift:=xlToLeft
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
Range("I2").Select
ActiveCell.FormulaR1C1 = "=IF(RC[-4]=""Goto_View"","""",RC[-1])"
Range("I2").Select
Selection.Copy
Range("H2").Select
Selection.End(xlDown).Select
Range("I60487").Select
Range(Selection, Selection.End(xlUp)).Select
ActiveSheet.Paste
Selection.End(xlUp).Select
Range("I1").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "DEST. FILE"
Range("I1").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Selection.End(xlUp).Select
Range("H1").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
ActiveWindow.SmallScroll Down:=9
Range("H1").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Columns("I:I").Select
Application.CutCopyMode = False
Selection.Delete Shift:=xlToLeft
ActiveWindow.LargeScroll ToRight:=1
Columns("W:W").Select
Selection.Cut
ActiveWindow.LargeScroll ToRight:=-1
Columns("A:A").Select
ActiveSheet.Paste
ActiveWindow.LargeScroll ToRight:=1
Range("T2").Select
Selection.Copy
Columns("T:T").Select
Selection.Replace What:="ACROBAT_DEFAULT", Replacement:="NEW_WINDOW", _
LookAt:=xlPart, SearchOrder:=xlByRows, MatchCase:=False,
SearchFormat:= _
False, ReplaceFormat:=False
Range("T3").Select
Application.CutCopyMode = False
Range("T1").Select
ActiveWindow.LargeScroll ToRight:=-1
Range("A1").Select
Selection.End(xlDown).Select
Range("A1").Select
Selection.End(xlDown).Select
Rows("60488:60488").Select
Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
Columns("A:A").Select
Selection.SpecialCells(xlCellTypeBlanks).Select
Range(Selection, ActiveCell.SpecialCells(xlLastCell)).Select
Selection.ClearContents
Range("A1").Select
End Sub
--------------------


--
Simon Lloyd

Regards,
Simon Lloyd
'The Code Cage' (http://www.thecodecage.com)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top