See the attachment. Here you will see them working both on vertical and horizontal. Only you need to adjust the formula for them.
According to attached file :
1. My 1st approach is the named range "VCRange" for vertical and HCRange for horizontal. To use my procedure you have to leave the Column A and Row 1 Blank. Then click on B2 and start creating the named ranges.
VCRange is detecting the range from the starting row of the vertical group for that cell to row 1000 (You can change this 1000 as long as you need) and HCRange is detecting the range from the starting row of the vertical group for that cell to row 1000 (You can change this 1000 as long as you need). To do this for vertical it is finding the 1st blank cell above for that cell. Then taking the next row of that blank cell as a 1st row of the range and 1000 is the last row. And vice versa for horizontal.
2. 2nd approach is VCAvg for vertical and HCAvg for horizontal
VCAvg is calculating the 1/3 of the group for vertical and HCAvg for horizontal. To do so it it is detecting the 1st blank cell in the range VCRange and taking the count up to it's previous row. Now you have the number of items in this group and you are getting 1/3 by dividing 3. And vice versa for horizontal.
3. 3rd approach is VCPos for vertical and HCPos for horizontal.
VCPos is detecting the position of that cell in the vertical group and HCpos in horizontal group.
Then I have used the conditional formatting as belows:
For Vertical :
For Horizontal :
I hope that it will make sense now.
Bookmarks