Hello,
I have to run a fairly tedious task of conditional formatting for large tables. The catch is that I have to run this formatting one column at a time and within sections. Obviously in small datasets, this is fine, but I am trying to get vba to do this for me since my tables can get quite large. For Example, I would want conditional formatting to show the highest Truth Score and the Highest Energy Score for VPs, and then for directors and then for Managers, and then for analysts:
[TABLE="width: 500"]
<tbody>[TR]
[TD](average for each)[/TD]
[TD]VP[/TD]
[TD]Director[/TD]
[TD]Manager[/TD]
[TD]Analyst[/TD]
[/TR]
[TR]
[TD]Truth Question 1[/TD]
[TD]1[/TD]
[TD]3[/TD]
[TD]5[/TD]
[TD]6[/TD]
[/TR]
[TR]
[TD]Truth Question 2
[/TD]
[TD]2[/TD]
[TD]4[/TD]
[TD]2[/TD]
[TD]7[/TD]
[/TR]
[TR]
[TD]Truth Question 3[/TD]
[TD]3[/TD]
[TD]1[/TD]
[TD]3[/TD]
[TD]6[/TD]
[/TR]
[TR]
[TD]Energy Question 1[/TD]
[TD]5[/TD]
[TD]1[/TD]
[TD]7[/TD]
[TD]8[/TD]
[/TR]
[TR]
[TD]Energy Question 2[/TD]
[TD]2[/TD]
[TD]6[/TD]
[TD]7[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]Energy Question 3[/TD]
[TD]2[/TD]
[TD]9[/TD]
[TD]0[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]Energy Question 4[/TD]
[TD]3[/TD]
[TD]4[/TD]
[TD]6[/TD]
[TD]8[/TD]
[/TR]
</tbody>[/TABLE]
In the example above, I start with Truth Questions for VPs (3 cells), and apply formatting. Then I go to Directors, etc. After truth questions are done, I do the same for the 4 energy questions.
Each time I make these tables the number of questions per topic could change, as well as the number of breakouts (maybe 5 locations instead of by Position, etc). I would like to be able to just highlight a whole table and then run some vba and it will walk through the table for me, instead of having to manually create something like the above each time. Also, the actual types of conditional formatting I will be doing are more complex, but I know how to make those using vba. I just need help correctly finding the formatting ranges and looping through.
I greatly appreciate you pointing me in the right direction, as I am having a tough time getting this off the ground, although I know it's possible...
Thanks!
I have to run a fairly tedious task of conditional formatting for large tables. The catch is that I have to run this formatting one column at a time and within sections. Obviously in small datasets, this is fine, but I am trying to get vba to do this for me since my tables can get quite large. For Example, I would want conditional formatting to show the highest Truth Score and the Highest Energy Score for VPs, and then for directors and then for Managers, and then for analysts:
[TABLE="width: 500"]
<tbody>[TR]
[TD](average for each)[/TD]
[TD]VP[/TD]
[TD]Director[/TD]
[TD]Manager[/TD]
[TD]Analyst[/TD]
[/TR]
[TR]
[TD]Truth Question 1[/TD]
[TD]1[/TD]
[TD]3[/TD]
[TD]5[/TD]
[TD]6[/TD]
[/TR]
[TR]
[TD]Truth Question 2
[/TD]
[TD]2[/TD]
[TD]4[/TD]
[TD]2[/TD]
[TD]7[/TD]
[/TR]
[TR]
[TD]Truth Question 3[/TD]
[TD]3[/TD]
[TD]1[/TD]
[TD]3[/TD]
[TD]6[/TD]
[/TR]
[TR]
[TD]Energy Question 1[/TD]
[TD]5[/TD]
[TD]1[/TD]
[TD]7[/TD]
[TD]8[/TD]
[/TR]
[TR]
[TD]Energy Question 2[/TD]
[TD]2[/TD]
[TD]6[/TD]
[TD]7[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]Energy Question 3[/TD]
[TD]2[/TD]
[TD]9[/TD]
[TD]0[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]Energy Question 4[/TD]
[TD]3[/TD]
[TD]4[/TD]
[TD]6[/TD]
[TD]8[/TD]
[/TR]
</tbody>[/TABLE]
In the example above, I start with Truth Questions for VPs (3 cells), and apply formatting. Then I go to Directors, etc. After truth questions are done, I do the same for the 4 energy questions.
Each time I make these tables the number of questions per topic could change, as well as the number of breakouts (maybe 5 locations instead of by Position, etc). I would like to be able to just highlight a whole table and then run some vba and it will walk through the table for me, instead of having to manually create something like the above each time. Also, the actual types of conditional formatting I will be doing are more complex, but I know how to make those using vba. I just need help correctly finding the formatting ranges and looping through.
I greatly appreciate you pointing me in the right direction, as I am having a tough time getting this off the ground, although I know it's possible...
Thanks!