G
Guest
I am a basic excel user and wish to populate one excel sheet("Completions LL
Register 2004-09-030.xls") with another sheet that arives to me on
occasion(LL-CP-0163.xls). The trouble i am having is trying to figure out how
to make the macro open the next file (ie LL-CP-0164.xls) copy the same cell
references and then paste them in ("Completions LL Register 2004-09-030.xls")
only one row down as to not overwrite the previous data. Any help is
appreciated and some sample code is below to help explain.
Windows("Completions LL Register 2004-09-030.xls").Activate
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Windows("LL-CP-0163.xls").Activate
Range("F3:H3").Select
Application.CutCopyMode = False
Selection.Copy
Windows("Completions LL Register 2004-09-030.xls").Activate
Range("F164").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Windows("LL-CP-0163.xls").Activate
Range("B12:J18").Select
Application.CutCopyMode = False
Selection.Copy
Windows("Completions LL Register 2004-09-030.xls").Activate
Range("G164").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Windows("LL-CP-0163.xls").Activate
Range("F2:H2").Select
Application.CutCopyMode = False
Selection.Copy
Windows("Completions LL Register 2004-09-030.xls").Activate
Range("H164").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Windows("LL-CP-0163.xls").Activate
Range("B55").Select
Application.CutCopyMode = False
Selection.Copy
Windows("Completions LL Register 2004-09-030.xls").Activate
Range("I164").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Windows("LL-CP-0163.xls").Activate
ActiveWindow.SmallScroll Down:=-27
Range("B20:J25").Select
Application.CutCopyMode = False
Selection.Copy
Windows("Completions LL Register 2004-09-030.xls").Activate
Range("L164").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Windows("LL-CP-0163.xls").Activate
Range("B35:J39").Select
Application.CutCopyMode = False
Selection.Copy
Windows("Completions LL Register 2004-09-030.xls").Activate
Range("O164").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Windows("LL-CP-0163.xls").Activate
Range("B27:J33").Select
Application.CutCopyMode = False
Selection.Copy
Windows("Completions LL Register 2004-09-030.xls").Activate
Range("O164").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Windows("LL-CP-0163.xls").Activate
Range("B35:J39").Select
Application.CutCopyMode = False
Selection.Copy
Windows("Completions LL Register 2004-09-030.xls").Activate
Range("Q164").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Windows("LL-CP-0163.xls").Activate
ActiveWindow.SmallScroll Down:=12
Range("B41:J46").Select
Application.CutCopyMode = False
Selection.Copy
Windows("Completions LL Register 2004-09-030.xls").Activate
Range("R164").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Range("E164").Select
Application.CutCopyMode = False
ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:= _
"\\SNF001\SNF1VOL3\SHARED\INTL\ 9000 Field Files\ 6 Lessons Learned
- IRR's\Completion 2004\Lessons Learned Close-Out Form\LL-CP-0163.xls"
End Sub
Register 2004-09-030.xls") with another sheet that arives to me on
occasion(LL-CP-0163.xls). The trouble i am having is trying to figure out how
to make the macro open the next file (ie LL-CP-0164.xls) copy the same cell
references and then paste them in ("Completions LL Register 2004-09-030.xls")
only one row down as to not overwrite the previous data. Any help is
appreciated and some sample code is below to help explain.
Windows("Completions LL Register 2004-09-030.xls").Activate
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Windows("LL-CP-0163.xls").Activate
Range("F3:H3").Select
Application.CutCopyMode = False
Selection.Copy
Windows("Completions LL Register 2004-09-030.xls").Activate
Range("F164").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Windows("LL-CP-0163.xls").Activate
Range("B12:J18").Select
Application.CutCopyMode = False
Selection.Copy
Windows("Completions LL Register 2004-09-030.xls").Activate
Range("G164").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Windows("LL-CP-0163.xls").Activate
Range("F2:H2").Select
Application.CutCopyMode = False
Selection.Copy
Windows("Completions LL Register 2004-09-030.xls").Activate
Range("H164").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Windows("LL-CP-0163.xls").Activate
Range("B55").Select
Application.CutCopyMode = False
Selection.Copy
Windows("Completions LL Register 2004-09-030.xls").Activate
Range("I164").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Windows("LL-CP-0163.xls").Activate
ActiveWindow.SmallScroll Down:=-27
Range("B20:J25").Select
Application.CutCopyMode = False
Selection.Copy
Windows("Completions LL Register 2004-09-030.xls").Activate
Range("L164").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Windows("LL-CP-0163.xls").Activate
Range("B35:J39").Select
Application.CutCopyMode = False
Selection.Copy
Windows("Completions LL Register 2004-09-030.xls").Activate
Range("O164").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Windows("LL-CP-0163.xls").Activate
Range("B27:J33").Select
Application.CutCopyMode = False
Selection.Copy
Windows("Completions LL Register 2004-09-030.xls").Activate
Range("O164").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Windows("LL-CP-0163.xls").Activate
Range("B35:J39").Select
Application.CutCopyMode = False
Selection.Copy
Windows("Completions LL Register 2004-09-030.xls").Activate
Range("Q164").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Windows("LL-CP-0163.xls").Activate
ActiveWindow.SmallScroll Down:=12
Range("B41:J46").Select
Application.CutCopyMode = False
Selection.Copy
Windows("Completions LL Register 2004-09-030.xls").Activate
Range("R164").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Range("E164").Select
Application.CutCopyMode = False
ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:= _
"\\SNF001\SNF1VOL3\SHARED\INTL\ 9000 Field Files\ 6 Lessons Learned
- IRR's\Completion 2004\Lessons Learned Close-Out Form\LL-CP-0163.xls"
End Sub