Copy filtered data with vba

JoeyGaspard

Board Regular
Joined
Jul 22, 2019
Messages
147
I am using the following code to filter and delete data, I would like to be able to copy the filtered data, but instead of the "EntireRow", I want to copy range A:E of the filtered set only instead of deleting, to cell A1 of another worksheet and turn off the filter so I can do it again with a different code, can someone help me on how to do that? Thanks in Advance!!

With Sheets("Data")

.AutoFilterMode = False

With .Range("A1", .Range("A" & Rows.Count).End(xlUp))

.AutoFilter 1, "95802"

On Error Resume Next

.Offset(1).SpecialCells(12).EntireRow.Delete

End With

.AutoFilterMode = False

End With
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
You're welcome & thanks for the feedback.

There is noway to donate & we don't want any payment. Just a word of thanks. :)
 
Upvote 0
You're welcome & thanks for the feedback.

There is noway to donate & we don't want any payment. Just a word of thanks. :)
Well, you Sir are totally awesome and I thank you each and every time you help me! You are much appreciated.
 
Upvote 0

Forum statistics

Threads
1,215,529
Messages
6,125,343
Members
449,219
Latest member
Smiqer

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