Can I cycle through this autofiltering and then transfer the data to a new workbook? VBA

nidenikolev

New Member
Joined
Jun 6, 2018
Messages
20
[TABLE="width: 500"]
<tbody>[TR]
[TD]Mgr Lvl2

[/TD]
[TD]Mgr Lvl3
[/TD]
[TD]Mgr Lvl4
[/TD]
[TD]Mgr Lvl5
[/TD]
[/TR]
[TR]
[TD]Mgr A
[/TD]
[TD]Mgr AA
[/TD]
[TD]Mgr AAA
[/TD]
[TD]Mgr AAAA
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]Mgr AB
[/TD]
[TD]Mgr AAB
[/TD]
[TD]Mgr AAAB
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD]Mgr AAC
[/TD]
[TD]Mgr AAAC
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD]Mgr AAD
[/TD]
[TD]Mgr AAAD

[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Mgr AAAE
[/TD]
[/TR]
</tbody>[/TABLE]
I have a roster file that I need to cut up in a bunch of different ways. It has employee info and it needs to be filtered by certain manager scopes--spanning over different levels.

I need VBA to go in and go to Manager lvl 5 (Column AT that has 150 total managers, only select Managers AAAA-AAAE, no other managers, they’llbe explicitly referenced by last name, first name).

Filter every manager one by one in that column: Filter to mgr AAAA, copy and paste all data into a new workbook, save by that managers name in that column it’s filtered by, and then unfilter all data.
Go to manager AAAB and do that same thing as mgr AAAA.
After all of the explicity referenced managers in ManagerLevel5 have been copy and pasted to their own sheets, I’ll want to unfilter alldata and start the process again by filtering only by the managers in theManager Level4 column.

I want it to cycle through only who I reference in mgr lvl 5column, then to mgr lvl 4 column, then to mgr lvl3 column and then mgr lvl2column. All only filtering to who I reference (smith, john / Arnold, Thomas / Wilson,susan / etc…) and then cycle the same way through the next column.

Can this be done?
 
Last edited:

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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