joshuafournier
Board Regular
- Joined
- Mar 3, 2012
- Messages
- 91
Good Morning,
i have 2 sheets one i copy data from "Log transfer" , and the other i copy data to "Log" in a table. since everyday someone will be transferring this data i was hoping to get rid of the blank rows. or atleast put the blank rows at the bottom. i have the rest of the sort how i would like it. i was also hoping to add a "paste to next available line" function in my code if that can be done??
can anyone help please?
here's my current code:
i have 2 sheets one i copy data from "Log transfer" , and the other i copy data to "Log" in a table. since everyday someone will be transferring this data i was hoping to get rid of the blank rows. or atleast put the blank rows at the bottom. i have the rest of the sort how i would like it. i was also hoping to add a "paste to next available line" function in my code if that can be done??
can anyone help please?
here's my current code:
Code:
Sheets("Log Transfer").Range("B2:M25").Copy
Sheets("Log").Range("A2").PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=True, Transpose:=False
Range("A2").Select
Application.CutCopyMode = False
ActiveWorkbook.Worksheets("Log").ListObjects("Table1").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("Log").ListObjects("Table1").Sort.SortFields.Add Key _
:=Range("Table1[Julien Date]"), SortOn:=xlSortOnValues, Order:= _
xlDescending, DataOption:=xlSortTextAsNumbers
ActiveWorkbook.Worksheets("Log").ListObjects("Table1").Sort.SortFields.Add Key _
:=Range("Table1[Shift]"), SortOn:=xlSortOnValues, Order:=xlAscending, _
CustomOrder:="Nights,Days,Afternoons", DataOption:=xlSortNormal
ActiveWorkbook.Worksheets("Log").ListObjects("Table1").Sort.SortFields.Add Key _
:=Range("Table1[Press]"), SortOn:=xlSortOnValues, Order:=xlAscending, _
CustomOrder:="A12,A13,A14,A15", DataOption:=xlSortNormal
With ActiveWorkbook.Worksheets("Log").ListObjects("Table1").Sort
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
Sheets("Shift 1 Numbers").Select
Range("F9").Select