Forum Discussion
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
- RassyCopper ContributorSorry, that above total should be 3.5 rather than 4.5.
- SergeiBaklanDiamond Contributor
Why don't use formal conditional formatting logic to count the totals?
If by color that's VBA, at least couple of threads are here
sum by color when colors are set by conditional formatting - Page 6 - Microsoft Tech Community
- RassyCopper Contributor
Thank you for the two links. The bottom link I have already followed. I just looked at the first link and there may be something in there that could work. But, I don't think it's going to assign a value to each of those colors. Unless I am not reading the VBA coding correctly. I do not have strong VBA skills so I am sure I am missing something.
At this point I have tried so many things that I may be confusing myself. If you come across a way to do what I am requesting and you can direct me how it works, that would be great!