View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
ChristianH[_2_] ChristianH[_2_] is offline
external usenet poster
 
Posts: 7
Default Change text colour of a cell when a different cell is selected

The following will change the font color of cell B4 when active

If ActiveCell = Cells(4, 1) Then
Cells(4, 2).Font.ColorIndex = 3
Else
Cells(4, 2).Font.ColorIndex = 1
End If

Paste it into your Worksheet_SelectionChange(ByVal Target As Range)
event.

Christian

wrote:

This problem is likely to be very easy for anyone with basic macro
knwoledge.

I need to know how to automatically change the colour of the text in
cell B4 to red everytime cell A4 is selected, then back to black when
cell A4 is unselected. Also, where do I place the code to perform this?

Any help will be much appreciated.