Copying and Pasting filtered data

pdchislett

New Member
Joined
Oct 12, 2009
Messages
22
Hi,

I'm trying to copy filtered data to another workbook.

I've tried using the following code which has worked before when the Filter headings are on row 1 but in this case the headings are on row 5.

Range("A5").Select

ActiveSheet.UsedRange.Offset(1, 0).SpecialCells _
(xlCellTypeVisible).Copy Workbooks(Upload_File).Worksheets("PAYMENTS").Range("A65536").End(xlUp).Offset(1, 0)

When the headings were on row 1 this just picked up the data rather than the headings and worked fine but this time it is picking up all the detail in rows 1-4 too.

Any ideas?

Thanks
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
Try

Code:
Dim LR As Long, LC As Long
LR = Range("A" & Rows.Count).End(xlUp).Row
LC = Cells(5, Columns.Count).End(xlToLeft).Column
Range(Cells(6, 1), Cells(LR, LC)).SpecialCells _
(xlCellTypeVisible).Copy Workbooks(Upload_File).Worksheets("PAYMENTS").Range("A" & Rows.Count).End(xlUp).Offset(1, 0)
 
Upvote 0

Forum statistics

Threads
1,214,998
Messages
6,122,639
Members
449,093
Latest member
Ahmad123098

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