Hello everyone,
I am having a problem coming up with the correct VBA code for a macro that I am developing, and I was hoping someone could provide some assistance.
I am attempting to develop code that will create new tabs within my workbook based on values within a raw data set, label the tabs based on the data value, then perform functions such as creating charts and graphs for those data values. Here is a small example of the type of data I am working with;
Department EmplID Rating
A 1 1
A 2 4
B 3 2
C 4 1
C 5 6
C 6 1
D 7 3
E 8 2
E 9 2
E 10 7
F 11 5
What I would like the code to do is create new tabs for each new department (A through F), label the tabs with that value (A through F), then execute formulas, charts, and graphs. I already have all of the coding done on the formulas, charts, and graphs, but I am uncertain as to how I can create the new tabs. To lay it out another way, here is the order of what I am looking to do:
1. Look for a new value for Department.
2. Create a new tab and label it based on the department name.
3. Execute formulas, charts, and graphs for that department
4. Begin process all over for the next new value for department.
Any help you can provide will be appreciated. Thanks.
Quint
I am having a problem coming up with the correct VBA code for a macro that I am developing, and I was hoping someone could provide some assistance.
I am attempting to develop code that will create new tabs within my workbook based on values within a raw data set, label the tabs based on the data value, then perform functions such as creating charts and graphs for those data values. Here is a small example of the type of data I am working with;
Department EmplID Rating
A 1 1
A 2 4
B 3 2
C 4 1
C 5 6
C 6 1
D 7 3
E 8 2
E 9 2
E 10 7
F 11 5
What I would like the code to do is create new tabs for each new department (A through F), label the tabs with that value (A through F), then execute formulas, charts, and graphs. I already have all of the coding done on the formulas, charts, and graphs, but I am uncertain as to how I can create the new tabs. To lay it out another way, here is the order of what I am looking to do:
1. Look for a new value for Department.
2. Create a new tab and label it based on the department name.
3. Execute formulas, charts, and graphs for that department
4. Begin process all over for the next new value for department.
Any help you can provide will be appreciated. Thanks.
Quint