![]() |
Coping Dates from workbook to workbook
For some reason everything copys to the new work book except for the date
column "L" can someone help me please. I stoped the code and it will only select the first date. But all other works why? how do I fix? ActiveSheet.Range("A2").AutoFilter Field:=12, Criteria1:="<" Application.ScreenUpdating = False Workbooks.Open Filename:= _ "C:\Users\Kenny\Documents\Toyota\Floater\Daily Tracker Report.xls" Windows("New Tracker.xls").Activate Range("L6").End(xlDown).Copy <======================== Windows("Daily Tracker Report.xls").Activate Worksheets("sheet1").Range("A5").PasteSpecial Paste:=xlPasteValues Windows("New Tracker.xls").Activate Range("A6:B6").Select Range(Selection, Selection.End(xlDown)).Select Selection.Copy Windows("Daily Tracker Report.xls").Activate Worksheets("sheet1").Range("B5").PasteSpecial Paste:=xlPasteValues Windows("New Tracker.xls").Activate Range("G6:K6").Select Range(Selection, Selection.End(xlDown)).Select Selection.Copy Windows("Daily Tracker Report.xls").Activate Worksheets("sheet1").Range("D5").PasteSpecial Paste:=xlPasteValues Windows("New Tracker.xls").Activate Range("A6").Select 'Range(Selection, ActiveCell.SpecialCells(xlLastCell)).Select 'Selection.EntireRow.Delete 'Windows("Daily Tracker Report.xls").Activate ActiveSheet.Range("A2").AutoFilter Field:=12 |
Coping Dates from workbook to workbook
Maybe you have a blank cell in L7.
xldown will stop at first blank cell it gets to. Range(("L6"), Cells(Rows.Count, ActiveCell.Column).End(xlUp)).Copy may work better. Gord Dibben MS Excel MVP On Fri, 5 Oct 2007 16:45:01 -0700, Kenny wrote: For some reason everything copys to the new work book except for the date column "L" can someone help me please. I stoped the code and it will only select the first date. But all other works why? how do I fix? ActiveSheet.Range("A2").AutoFilter Field:=12, Criteria1:="<" Application.ScreenUpdating = False Workbooks.Open Filename:= _ "C:\Users\Kenny\Documents\Toyota\Floater\Daily Tracker Report.xls" Windows("New Tracker.xls").Activate Range("L6").End(xlDown).Copy <======================== Windows("Daily Tracker Report.xls").Activate Worksheets("sheet1").Range("A5").PasteSpecial Paste:=xlPasteValues Windows("New Tracker.xls").Activate Range("A6:B6").Select Range(Selection, Selection.End(xlDown)).Select Selection.Copy Windows("Daily Tracker Report.xls").Activate Worksheets("sheet1").Range("B5").PasteSpecial Paste:=xlPasteValues Windows("New Tracker.xls").Activate Range("G6:K6").Select Range(Selection, Selection.End(xlDown)).Select Selection.Copy Windows("Daily Tracker Report.xls").Activate Worksheets("sheet1").Range("D5").PasteSpecial Paste:=xlPasteValues Windows("New Tracker.xls").Activate Range("A6").Select 'Range(Selection, ActiveCell.SpecialCells(xlLastCell)).Select 'Selection.EntireRow.Delete 'Windows("Daily Tracker Report.xls").Activate ActiveSheet.Range("A2").AutoFilter Field:=12 |
Coping Dates from workbook to workbook
thanks man you rock!
"Gord Dibben" wrote: Maybe you have a blank cell in L7. xldown will stop at first blank cell it gets to. Range(("L6"), Cells(Rows.Count, ActiveCell.Column).End(xlUp)).Copy may work better. Gord Dibben MS Excel MVP On Fri, 5 Oct 2007 16:45:01 -0700, Kenny wrote: For some reason everything copys to the new work book except for the date column "L" can someone help me please. I stoped the code and it will only select the first date. But all other works why? how do I fix? ActiveSheet.Range("A2").AutoFilter Field:=12, Criteria1:="<" Application.ScreenUpdating = False Workbooks.Open Filename:= _ "C:\Users\Kenny\Documents\Toyota\Floater\Daily Tracker Report.xls" Windows("New Tracker.xls").Activate Range("L6").End(xlDown).Copy <======================== Windows("Daily Tracker Report.xls").Activate Worksheets("sheet1").Range("A5").PasteSpecial Paste:=xlPasteValues Windows("New Tracker.xls").Activate Range("A6:B6").Select Range(Selection, Selection.End(xlDown)).Select Selection.Copy Windows("Daily Tracker Report.xls").Activate Worksheets("sheet1").Range("B5").PasteSpecial Paste:=xlPasteValues Windows("New Tracker.xls").Activate Range("G6:K6").Select Range(Selection, Selection.End(xlDown)).Select Selection.Copy Windows("Daily Tracker Report.xls").Activate Worksheets("sheet1").Range("D5").PasteSpecial Paste:=xlPasteValues Windows("New Tracker.xls").Activate Range("A6").Select 'Range(Selection, ActiveCell.SpecialCells(xlLastCell)).Select 'Selection.EntireRow.Delete 'Windows("Daily Tracker Report.xls").Activate ActiveSheet.Range("A2").AutoFilter Field:=12 |
All times are GMT +1. The time now is 02:09 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com