copying and having blank rows...

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:

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
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying

Forum statistics

Threads
1,223,240
Messages
6,170,951
Members
452,368
Latest member
jayp2104

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top