Copy/Paste from a filter

Mashtonsmith

Board Regular
Joined
Oct 1, 2004
Messages
164
Hello...

I'm sure this has a simple answer..

I'm trying to copy and paste from a large filtered workbook.

When I paste all the rows that the filter removes are pasted also.

How can I just copy and paste the filtered selection?

Thanks
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
Hello...

I'm sure this has a simple answer..

I'm trying to copy and paste from a large filtered workbook.

When I paste all the rows that the filter removes are pasted also.

How can I just copy and paste the filtered selection?

Thanks

Maybe something like this?

Code:
Sub Mashtonsmith()
Dim lr As Long

lr = Cells(Rows.Count, 1).End(xlUp).Row
'
    Columns("B:B").AutoFilter
    Selection.AutoFilter Field:=1, Criteria1:="YOUR CRITERIA"
    Range("A2:C" & lr).EntireRow.SpecialCells(xlCellTypeVisible).Copy Sheets("Sheet2").Range("A1")

End Sub
 
Upvote 0
Thanks for responding John

I was hoping for a simpler answer! Is there not a paste or copy function that can do this?
 
Upvote 0
Thanks for responding John

I was hoping for a simpler answer! Is there not a paste or copy function that can do this?


I've never had that problem with filtered data. I only select the range, copy and paste. Only the visible cells are copied and pasted. Therefore I don't know why that doesn't work for you.
 
Upvote 0

Forum statistics

Threads
1,212,933
Messages
6,110,759
Members
448,295
Latest member
Uzair Tahir Khan

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