Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Changing the colors of a cell
I have been trying to use a macro to change the colors of a cell.. the first
change from default to pink is ok but then it will not change to another color. If t6 = yes Then Range("t7:w7").Select Selection.Interior.ColorIndex = 7 ElseIf u6 = no Then Range("t7:w7").Select Selection.Interior.ColorIndex = 2 ElseIf w6 = yes Then Range("t7:w7").Select Selection.Interior.ColorIndex = 4 Else: Range("t7:w7").Select Selection.Interior.ColorIndex = 2 End If End Sub Any ideas would be appreciated.... thanks for the help in the past |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Changing the colors of a cell
If Range("t6").Value = "yes" Then Range("t7:w7").Interior.ColorIndex = 7 ElseIf Range("u6").Value = " no Then Range("t7:w7").Interior.ColorIndex = 2 ElseIf Range("w6").Value = "yes Then Range("t7:w7")..ColorIndex = 4 Else Range("t7:w7").Interior.ColorIndex = 2 End If -- HTH RP (remove nothere from the email address if mailing direct) "Keith" wrote in message ... I have been trying to use a macro to change the colors of a cell.. the first change from default to pink is ok but then it will not change to another color. If t6 = yes Then Range("t7:w7").Select Selection.Interior.ColorIndex = 7 ElseIf u6 = no Then Range("t7:w7").Select Selection.Interior.ColorIndex = 2 ElseIf w6 = yes Then Range("t7:w7").Select Selection.Interior.ColorIndex = 4 Else: Range("t7:w7").Select Selection.Interior.ColorIndex = 2 End If End Sub Any ideas would be appreciated.... thanks for the help in the past |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Changing cell colors | Excel Discussion (Misc queries) | |||
changing cell background colors with formulas | Excel Worksheet Functions | |||
Cell colors or text color changing when date in cell gets closer. | Excel Worksheet Functions | |||
changing cell colors with formula | Excel Worksheet Functions | |||
Cell contents changing colors | Excel Programming |