copy, paste special, resize & offset

jdcar

New Member
Joined
Oct 9, 2021
Messages
17
Office Version
  1. 2016
Platform
  1. Windows
Hello everyone
Why, when I copy and paste in Excel VBA (copy, paste special, resize & offset), in this case in a table, the first column (where the posting order number is recorded), the table does not fill the respective line numeric?

What needs to be done to resolve this issue? Thank you very much

Code used in module below
VBA Code:
Sub CopyPast_Test()       

''to Delete
    Sheets("sheet1").Range("B1:p2000").AdvancedFilter Action:=xlFilterCopy, _
        CriteriaRange:=Sheets("sheet5").Range("T5:T6"), CopyToRange:=Sheets("sheet5").Range("aq1:Aw1"), Unique:=False

    Dim CurrentRegion As Range
        Sheet19.Range("aq2").CurrentRegion.Offset(1,      0).Resize(Sheet19.Range("aq2").CurrentRegion.Rows.Count - 1).Copy
        Sheets("sheet12").Range("c361").PasteSpecial xlPasteValuesAndNumberFormats
        Application.CutCopyMode = False

        Sheet11.Range("a1").Select
End Sub

Sub TrimPed_GrPED()
Dim ws As Worksheet
Dim LastRow As Long
    Set ws = ThisWorkbook.Sheets("sheet1")
    LastRow = ws.ListObjects("sheet12").DataBodyRange.Rows.Count
    ws.ListObjects("sheet12").ListRows(LastRow).Delete
End Sub
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.

Forum statistics

Threads
1,215,077
Messages
6,122,991
Members
449,094
Latest member
masterms

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