How do I Create this Macro?

Excelage

New Member
Joined
Nov 19, 2014
Messages
11
Hi folks, I want to create a macro in Excel but am not sure how to do it.


I have a list of many supervisors and the employees under them for a department. I need to keep the master tab (the one listing everyone in that department), copy that tab, filter by every supervisor but one, delete the rows with the other supervisors, clear the filter, rename the tab after the supervisor, and then repeat this process for the remaining supervisors. The entire workbook is for one department, and each tab other than the master tab is for a different supervisor.

I didn't see a way to attach an Excel file, so I pasted a link to a Google Sheets version that could be downloaded into the Excel format.

The file linked to here is an example of the process just mentioned but is different from the file I'll actually create a macro for (these files are different to preserve employee privacy). I also deleted from this file some of the columns that are in the file I'm working on (anyone with the link can edit the Google Sheets file linked to here):


https://docs.google.com/spreadsheets/d/1XfWXs9e9Gu08D2jspaJYQJvl8501vwlWoQ6TklBzhs4/edit?usp=sharing


I would really appreciate any help because this process is very time consuming when done manually, and I must regularly perform it.


If you need any clarification, please let me know.


Thanks in advance for any help you can offer me. :biggrin:

Edit: To download as an Excel file, click "File," "Download As," then "Excel File"
 
Last edited:

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
Welcome to the Board!

Why bother with code when a Pivot Table should do it? If you create a master PT, then put the Supervisor name in the Filter field, you can use the "Show Report Filter Pages" option to create a new PT worksheet for each Supervisor. The nice thing is that as you update the master sheet you can refresh the pivot tables to update any new data.

HTH,
 
Upvote 0

Forum statistics

Threads
1,215,051
Messages
6,122,872
Members
449,097
Latest member
dbomb1414

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