![]() |
Activating a comment box based on conditional formatting
Hi there, assistance is appreciated. I am trying to set a cell to show a
pre-added comment box based on a conditional formatting (i.e. if cell value is less than 0, make background red AND show comment. Thanks, |
Activating a comment box based on conditional formatting
Do you mean something like this:
Private Sub Worksheet_Change(ByVal Target As Range) If Application.Intersect(Target, Range("A1")) Is Nothing Then Exit Sub If Not Application.Intersect(Target, Range("A1")) Is Nothing And Target.Value < 0 Then Target.AddComment Text:="Amount is in the Negative" Target.Comment.Visible = True End If End Sub "Andrew Rodriguez" wrote: Hi there, assistance is appreciated. I am trying to set a cell to show a pre-added comment box based on a conditional formatting (i.e. if cell value is less than 0, make background red AND show comment. Thanks, |
Activating a comment box based on conditional formatting
Hi Jim,
Thanks for your response, it is appreciated. I recognize that it must be added to the worsheet in VBA mode but how do I activate it?...also I wish this to work on multiple cells and not all cells are in a continuous column, though all are in the same column. Sorry, I am not familiar in any way with the VBA part of Excel though I recognize the code from macro creation. "Jim May" wrote: Do you mean something like this: Private Sub Worksheet_Change(ByVal Target As Range) If Application.Intersect(Target, Range("A1")) Is Nothing Then Exit Sub If Not Application.Intersect(Target, Range("A1")) Is Nothing And Target.Value < 0 Then Target.AddComment Text:="Amount is in the Negative" Target.Comment.Visible = True End If End Sub "Andrew Rodriguez" wrote: Hi there, assistance is appreciated. I am trying to set a cell to show a pre-added comment box based on a conditional formatting (i.e. if cell value is less than 0, make background red AND show comment. Thanks, |
All times are GMT +1. The time now is 02:42 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com