23
5
An Excel column contains a text value representing the category of that row.
Is there a way to format all cells having a distinct value a unique color without manually creating a conditional format for each value?
Example: If I had the categories bedroom, bedroom, bathroom, kitchen, living room
, I would want all cells containing bedroom
to be a particular color, bathroom
a different color, etc.
A lot of people here might also be interested in this related question: "How to change background color of cell based on other cell value by VBA": https://stackoverflow.com/questions/45955832/how-to-change-background-color-of-cell-based-on-other-cell-value-by-vba
– Ryan – 2019-11-21T19:46:11.103If you dont want to do it manually, how do you want it decided what color things should be? – soandos – 2011-07-27T18:14:57.837
2I would like it automatic if possible, similar to how colors are chosen for different series in a chart. – Steven – 2011-07-27T18:27:26.513
Ah, so you want all cell with the same contents to be the same color, but dont care which color it is? – soandos – 2011-07-27T18:39:55.480
Would a one-time macro (to create the conditional formats once) be acceptable? It would need to be run exactly once per workbook and could be removed after that. – Tex Hex – 2011-07-27T19:58:40.560
soandos: Yes, TeX Hex: Sure! – Steven – 2011-07-27T20:14:40.683