mikezhel1987
New Member
- Joined
- Jun 7, 2017
- Messages
- 10
I want to copy the filtered data and paste it in difference excel worksheet. I am able to filter , copy and paste the rows. The only problem I am facing is that it is also copying and pasting the header every time. Please advise as to how to avoid header to be pasted. Below is the code that I used.
Appreciate any help from you guys. Thanks
Code:
[/COLOR][COLOR=#333333]Private Sub CommandButton1_Click()[/COLOR]
<code style="margin: 0px; padding: 0px; font-style: inherit; font-weight: inherit; line-height: 12px;">
Dim sh As Worksheet
Dim ws As Worksheet
Set sh = Sheets("June")
Set ws = Sheets("July")
sh.Range("t1", sh.Range("T" & Rows.Count).End(xlUp)).AutoFilter 1, "Yes"
sh.Range("A2", sh.Range("S" & Rows.Count).End(xlUp)).Copy ws.Range("A" & Rows.Count).End(xlUp)(2)
sh.[e2].AutoFilter
</code>[COLOR=#333333]End Sub[/COLOR][COLOR=#333333]
Appreciate any help from you guys. Thanks