Reputation: 21
I have a spreadsheet containing rating data for hundreds of leaders in our organization. Using VBA, I would like to find the average rating on each question for each leader. Example:
My data is is the following format
-Name Question Rating
-John Q1 4
-John Q1 2
-John Q2 3
-John Q2 2
-Heather Q1 5
-Heather Q1 3
-Heather Q2 3
-Heather Q2 1
I would like to get the below result based on this data.
John
Q1 Average 3
Q2 Average 2.5
Heather
Q1 Average 4
Q2 Average 2
Hopefully this is clear. I am somewhat new to VBA, so thanks for the help!
Upvotes: 1
Views: 78
Reputation: 2764
I second Lisa's suggestion of a PivotTable. There's no need for custom VBA code when Excel has out-of-the-box functionality to do what you want.
Upvotes: 1