Change Fill Color on Row When Name Changes

stanleytheyak

Board Regular
Joined
Oct 10, 2008
Messages
124
I have a sheet that is similar to the following:

[TABLE="width: 304"]
<colgroup><col span="2"><col><col></colgroup><tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Name[/TD]
[TD]Item[/TD]
[TD]Description[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]Tom Smith[/TD]
[TD]1[/TD]
[TD]Item 1[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]John Adams[/TD]
[TD]2[/TD]
[TD]Item 2[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]John Adams[/TD]
[TD]3[/TD]
[TD]Item 3[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]Ronald Regan[/TD]
[TD]4[/TD]
[TD]Item 4[/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]Ronald Regan[/TD]
[TD]5[/TD]
[TD]Item 5[/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]Ronald Regan[/TD]
[TD]6[/TD]
[TD]Item 6[/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD]John Kennedy[/TD]
[TD]7[/TD]
[TD]Item 7[/TD]
[/TR]
[TR]
[TD]9[/TD]
[TD]John Kennedy[/TD]
[TD]8[/TD]
[TD]Item 8[/TD]
[/TR]
[TR]
[TD]10[/TD]
[TD]John Kennedy[/TD]
[TD]9[/TD]
[TD]Item 9[/TD]
[/TR]
[TR]
[TD]11[/TD]
[TD]John Kennedy[/TD]
[TD]10[/TD]
[TD]Item 10[/TD]
[/TR]
</tbody>[/TABLE]

What I would like to do is to have each name in column A determine fill color for the row. So, Row 2 (Tom Smith) would be green. Rows 3-4 (John Adams) would be light green. Rows 5-7 (Ronald Regan) would be blue. And so on.

I need to automate this, as the list changes frequently. Names are added/removed, items are added, etc.

Any help in doing this would be greatly appreciated!
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
It seems that the color is different for each name. If this is correct, you would need a list of names, perhaps in a separate sheet, along with the corresponding colors for each name. If names are added, you would need to update the names and colors on the separate sheet.
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,284
Members
452,630
Latest member
OdubiYouth

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top