Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Colouring cells according to names

Status
Not open for further replies.

DonyBoy

MIS
Apr 22, 2005
26
GB
I’m trying to colour some excel cells in a unique way. In column A, I have some names of people. Each person has a unique colour associated with his/her name. So, when I write that persons name in (lets say, cell A5) I want D5:F5 (3 cells) to go blue (or whatever the colour associated with that person). There is a column of 20 ish names and I want this same thing to happen to each row as and when I change/write names in Column A.

Is this possible to do this in Excel without a VBA function? If not, can anyone tell me how to do this in VBA?
 
try conditional formatting. Select the range of cells where names would be, then go to Format | Conditional Formatting, establish one condition for each name and the resulting color. The problem is that you only have up to three conditions you can establish.
 
DonyBoy: Conditional Formatting will allow you to set up to three different conditions, each with its own color. If you change the color of the rest of the cells (so that when none of the three conditions are met you still have a colored cell), you can eek out four different colors. But that's the limit with Conditional Formatting.

If you have more than four different names, you'll need to use VBA. If you need to go that route, take a look at thread68-1295894.

If you need further help, please start a new thread in forum707, the VBA Visual Basic for Applications (Microsoft) Forum.

[tt]_____
[blue]-John[/blue][/tt]
[tab][red]The plural of anecdote is not data[/red]

Help us help you. Please read FAQ181-2886 before posting.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top