Forum Discussion

Rassy's avatar
Rassy
Copper Contributor
Dec 05, 2020

Count color and add a value to Conditional formatting

I am trying to take the conditional formatting colors on a row(not a column) and count the formatting colors.  The caveat is that I want each color to represent a vale that I provide.  For instance, there are 3 colors that I want to count and the color is  from these cells already being conditional formatting.  I have gone through processes to get the totals, and to get the color numbers but I am still having issues getting what I want.  I don't care if it's a formula or a VBA. 

 

I want the "red" conditional formatting to have a value of -0.10.  i.e. If there are 5 "red" cells in the row, I want that to total out to be -0.50 for that row.  I then want the "tan" to have a value of 1 and the "green" to have a value of 3.  

 

Result I am looking for: If there are 5 red, 1 tan and 1 green in a row, I want to be able to sum that all up in a cell as 4.50.  

 

I have attached a snip of what I am looking for help with.  I had to create a large workbook with 30-40 sheets and a lot of Excel related coding to the workbook.  So, I won't be sharing that data.  I have gone through a lot of trial and error and I am hoping someone can point me in th

4 Replies

Resources