Changing the colors of a cell

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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)
 
Back
Top