Please be kind, as I am new here and new to VBA in general. I have an Excel 2007 problem I’m trying to solve with macros and I’m hoping someone can help me with the code. Our company is structured as follows (except on a much larger scale, obviously):</SPAN>
[TABLE="width: 300"]
<TBODY>[TR]
[TD]Mgr A
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Supv A
[/TD]
[TD]Supv B
[/TD]
[/TR]
[TR]
[TD]Emp 1
[/TD]
[TD]Emp 1
[/TD]
[/TR]
[TR]
[TD]Emp 2
[/TD]
[TD]Emp 2
[/TD]
[/TR]
[TR]
[TD]Emp 3
[/TD]
[TD]Emp 3
[/TD]
[/TR]
[TR]
[TD]Emp 4
[/TD]
[TD][/TD]
[/TR]
</TBODY>[/TABLE]
[TABLE="width: 300"]
<TBODY>[TR]
[TD]Mgr B
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Supv C
[/TD]
[TD]Supv D
[/TD]
[/TR]
[TR]
[TD]Emp 1
[/TD]
[TD]Emp 1
[/TD]
[/TR]
[TR]
[TD]Emp 2
[/TD]
[TD]Emp 2
[/TD]
[/TR]
[TR]
[TD]Emp 3
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
</TBODY>[/TABLE]
I need to create a separate pivot table (in a separate tab) for each person. I have a tab with names and titles that I can use as a reference, but I don’t know how to write the code. Currently I’m manually creating a pivot for Supv A, going to the Names tab and filtering to get his employees, going back to the pivot and filtering by checking off the names, and then creating pivots for all checked. There has to be an easier way. I’d like be able to do it all with macros because of the number of people involved. I apologize for my convoluted explanation, but if anyone can help with code I’d be so grateful. </SPAN>
[TABLE="width: 300"]
<TBODY>[TR]
[TD]Mgr A
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Supv A
[/TD]
[TD]Supv B
[/TD]
[/TR]
[TR]
[TD]Emp 1
[/TD]
[TD]Emp 1
[/TD]
[/TR]
[TR]
[TD]Emp 2
[/TD]
[TD]Emp 2
[/TD]
[/TR]
[TR]
[TD]Emp 3
[/TD]
[TD]Emp 3
[/TD]
[/TR]
[TR]
[TD]Emp 4
[/TD]
[TD][/TD]
[/TR]
</TBODY>[/TABLE]
[TABLE="width: 300"]
<TBODY>[TR]
[TD]Mgr B
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Supv C
[/TD]
[TD]Supv D
[/TD]
[/TR]
[TR]
[TD]Emp 1
[/TD]
[TD]Emp 1
[/TD]
[/TR]
[TR]
[TD]Emp 2
[/TD]
[TD]Emp 2
[/TD]
[/TR]
[TR]
[TD]Emp 3
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
</TBODY>[/TABLE]
I need to create a separate pivot table (in a separate tab) for each person. I have a tab with names and titles that I can use as a reference, but I don’t know how to write the code. Currently I’m manually creating a pivot for Supv A, going to the Names tab and filtering to get his employees, going back to the pivot and filtering by checking off the names, and then creating pivots for all checked. There has to be an easier way. I’d like be able to do it all with macros because of the number of people involved. I apologize for my convoluted explanation, but if anyone can help with code I’d be so grateful. </SPAN>