Fonts in excel

Closed
Komal88 Posts 1 Registration date Monday March 31, 2014 Status Member Last seen March 31, 2014 - Mar 31, 2014 at 03:54 AM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 - Mar 31, 2014 at 11:58 AM
I want to reply to the comments in cells in a color which have alrady been typed in another color. Ex: if i get a comment in red color , i want my replies to be in purple always when i type in the same cell.
Related:

1 response

TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 552
Mar 31, 2014 at 11:58 AM
Hi Komal88,

Whenever the entire comment is done in red, then the text in that cell we be purple.

Implement the following code by right-clicking the sheets tab and selecting View Code. Paste the code in the big white field.

Private Sub Worksheet_Change(ByVal Target As Range)
If Not Target.Comment Is Nothing Then
If Target.Comment.Shape.TextFrame.Characters.Font.ColorIndex = 3 Then Target.Font.ColorIndex = 13
End If
End Sub

Best regards,
Trowa
0