ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   AutoColoring (https://www.excelbanter.com/excel-programming/391661-autocoloring.html)

Tim

AutoColoring
 
I would like to auto color my (row) data based on the content in a column.
For instance if Column A was "Type" and if row 2,4,5 had "A" then they would
all be green, if row 3,7 were "B" then they would be red and if row 6 was "C"
then it would be yellow. And so on in that fashion. I want the whole row to
be that color, and the color would be the background color. I would like as
much of this to be automatic so color selection for each new type would be
automatic (256 color support is fine, I don't need more then that many
types). I am sure there is someway of using an array to runs this but I am
unsure of how to store it, run it, etc.

steve_doc

AutoColoring
 
1 solution might be using Conditional formatting
Try the following link

http://www.xldynamic.com/source/xld.html

other option is via a VBA Sub using EntireRow.Interior.ColorIndex = 3 ' as eg



"Tim" wrote:

I would like to auto color my (row) data based on the content in a column.
For instance if Column A was "Type" and if row 2,4,5 had "A" then they would
all be green, if row 3,7 were "B" then they would be red and if row 6 was "C"
then it would be yellow. And so on in that fashion. I want the whole row to
be that color, and the color would be the background color. I would like as
much of this to be automatic so color selection for each new type would be
automatic (256 color support is fine, I don't need more then that many
types). I am sure there is someway of using an array to runs this but I am
unsure of how to store it, run it, etc.



All times are GMT +1. The time now is 03:08 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com