Selecting filtered data without column headings in macro

scany42

New Member
Joined
Jun 4, 2013
Messages
20
I am creating a macro from a large set of data. When I filter data from a particular column, I then take those results, select all the data (multiple columns and rows), and copy them over to another sheet. What do I need to tell macro so it selects all the filtered data but does not include column headings? It needs to be able to work no matter what amount of data results from the filter. Thanks.
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
After filtering, you then need to check for the new lastrow in the data and copy from the second row to that lastrow. Am assuming in this case that my data is from A to E

Code:
lastrow = Range("A1").End(xlDown).Row
    Range("A2:E" & lastrow).Select
    Selection.Copy
'you can then paste in the new sheet
 
Upvote 0

Forum statistics

Threads
1,214,975
Messages
6,122,538
Members
449,088
Latest member
RandomExceller01

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