Excel vba that will change color according to another cell's col

Closed
jcinum Posts 1 Registration date Monday March 31, 2014 Status Member Last seen March 31, 2014 - Mar 31, 2014 at 06:52 AM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 - Apr 3, 2014 at 11:30 AM
Hi

I am trying to change a cell color according to the color of another cell, tried diffarent ways to do this but failing could someone help please. I want the spreadsheet to look at column K and then according to the color of the cells in that column to change the color of column A!
Related:

1 response

TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 552
Apr 3, 2014 at 11:30 AM
Hi Jcinum,

You didn't specify your colors, but the following code will change the color of column A into yellow if column K is red.
Sub RunMe()
If Columns("K:K").Interior.ColorIndex = 3 Then Columns("A:A").Interior.ColorIndex = 6
End Sub

Best regards,
Trowa

0