View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default Conditional to change cell color by Selecting Cells

Try this:-

Right click the sheet tab and paste this in.

Public LastCell As Range

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not LastCell Is Nothing Then
LastCell.Interior.ColorIndex = xlNone
End If
Target.Interior.ColorIndex = 6
Set LastCell = Target
End Sub

Mike

"maperalia" wrote:

It is possible to change the font color of the select cell only.
For example, If I select the cell A1 I want to see the font in blue, bold,
however, after I select the cell A2 I want the cell A1 to return to its
previous setup and get the blue, bold at cell A2.
Therefore, the conditional will work only for selected cell if not select
return to original setup.

Thanks in advance.
Maperalia