Macro

Closed
KarenPostell Posts 2 Registration date Wednesday August 17, 2016 Status Member Last seen August 17, 2016 - Aug 17, 2016 at 02:13 PM
KarenPostell Posts 2 Registration date Wednesday August 17, 2016 Status Member Last seen August 17, 2016 - Aug 17, 2016 at 02:18 PM
Hello, in excel 2013 I have column of cells a:2:a4955 of the cell.interior.colorindex = 3 then
I need to return "red"

I can't get his to work.
Related:

1 response

KarenPostell Posts 2 Registration date Wednesday August 17, 2016 Status Member Last seen August 17, 2016
Aug 17, 2016 at 02:18 PM
Sub What_color ()
Dim Cell as Range
For each cell in range ("a:2:a4955")
If cell.interior.colorIndex = 3
Then cell.value = "red"
Next cell
End sub
0