Excel VBA - Autofilter, copy, paste to new sheet

Benzoli7

Board Regular
Joined
Jan 11, 2010
Messages
136
Hello,

Can anyone help me with some code that can autofilter, copy, and paste to a new sheet that is named after the filtered field?

Row 1 has column headers and column A contains the unique values that I want to filter by. There will be multiple rows containing each unique value.

I don't know all of the unique values that could be in column A. Is there a way to write the code to make the macro filter each unique value without knowing what those values are?

I also need it to create a new sheet and name the sheet after the unique value from column A.

Next, it would need to copy the filtered data and paste it to the newly created sheet.

It would need to repeat this process until each unique data set has been copied to its own sheet.

Thanks for any help.
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
Hi,
Anyone has any idea of how i can look for a certain value from a certain sheet to another sheet without using the macro autofilter function?
 
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