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

Closed
jcinum Posts 1 Registration date Monday 31 March 2014 Status Member Last seen 31 March 2014 - 31 Mar 2014 à 06:52
TrowaD Posts 2921 Registration date Sunday 12 September 2010 Status Contributor Last seen 27 December 2022 - 3 Apr 2014 à 11:30
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 12 September 2010 Status Contributor Last seen 27 December 2022 555
3 Apr 2014 à 11:30
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