Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 28
Default Can Excel create a conditional Comment on a cell?

Can Excel create a conditional Comment on a cell? i.e. if cell value is above
a value, create a comment ("Value is Very High = 'Cell Value' ")
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
jIM jIM is offline
external usenet poster
 
Posts: 17
Default Can Excel create a conditional Comment on a cell?

On Feb 16, 10:05 am, Desmond
wrote:
Can Excel create a conditional Comment on a cell? i.e. if cell value is above
a value, create a comment ("Value is Very High = 'Cell Value' ")


Yes- use IF function

Example

Column A put 1,2,3,4,5 A1:A5
Column B IF (A12, "too high", "too low")
copy B1 to B1:B5

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,365
Default Can Excel create a conditional Comment on a cell?

Only through the use of a Macro if you're thinking of a comment type popup.
That could be done with code similar to this using the Worksheet_Change()
event handler (assumes you are watching for values .gt. 150 in cell B5 on a
sheet) :

Private Sub Worksheet_Change(ByVal Target As Range)

If Target.Address < Range("B5").Address Then
Exit Sub
End If
If Target 150 Then
Target.ClearComments ' erase any old
Target.AddComment
Target.Comment.Visible = False
Target.Comment.Text Text:="The value is above 150"
Else
Target.ClearComments
End If

End Sub

Now, if you just want a visible flag to indicate when a value goes
above/below or reaches a specific value, then you could look into Conditional
Formatting. You can use that [via Format | Conditional Formatting in the
menu toolbar] to set the appearance of a cell based on the value of the cell
itself. This might be a better solution for you since it involves no coding,
is easier to apply to a large number of cells, especially if those cells are
spread out around the worksheet.

"Desmond" wrote:

Can Excel create a conditional Comment on a cell? i.e. if cell value is above
a value, create a comment ("Value is Very High = 'Cell Value' ")

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 28
Default Can Excel create a conditional Comment on a cell?

Thanks. I already use conditional formatting and I cap the value so that it
does not skew my average, but I want to keep a history of the original value
in a pop up comment. I was hoping to stay away from vba as other users get
freaked out when the open the spreadsheet and it warns them that 'Macro's may
have a virus".

"JLatham" wrote:

Only through the use of a Macro if you're thinking of a comment type popup.
That could be done with code similar to this using the Worksheet_Change()
event handler (assumes you are watching for values .gt. 150 in cell B5 on a
sheet) :

Private Sub Worksheet_Change(ByVal Target As Range)

If Target.Address < Range("B5").Address Then
Exit Sub
End If
If Target 150 Then
Target.ClearComments ' erase any old
Target.AddComment
Target.Comment.Visible = False
Target.Comment.Text Text:="The value is above 150"
Else
Target.ClearComments
End If

End Sub

Now, if you just want a visible flag to indicate when a value goes
above/below or reaches a specific value, then you could look into Conditional
Formatting. You can use that [via Format | Conditional Formatting in the
menu toolbar] to set the appearance of a cell based on the value of the cell
itself. This might be a better solution for you since it involves no coding,
is easier to apply to a large number of cells, especially if those cells are
spread out around the worksheet.

"Desmond" wrote:

Can Excel create a conditional Comment on a cell? i.e. if cell value is above
a value, create a comment ("Value is Very High = 'Cell Value' ")

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,365
Default Can Excel create a conditional Comment on a cell?

I understand that issue - not much to be done about that in this case, I'm
afraid. I don't know of any other way to add a comment to a cell
automatically except via code, having tried clean living, wishful thinking
and even sacrificing small reptiles - all to no avail <g



"Desmond" wrote:

Thanks. I already use conditional formatting and I cap the value so that it
does not skew my average, but I want to keep a history of the original value
in a pop up comment. I was hoping to stay away from vba as other users get
freaked out when the open the spreadsheet and it warns them that 'Macro's may
have a virus".

"JLatham" wrote:

Only through the use of a Macro if you're thinking of a comment type popup.
That could be done with code similar to this using the Worksheet_Change()
event handler (assumes you are watching for values .gt. 150 in cell B5 on a
sheet) :

Private Sub Worksheet_Change(ByVal Target As Range)

If Target.Address < Range("B5").Address Then
Exit Sub
End If
If Target 150 Then
Target.ClearComments ' erase any old
Target.AddComment
Target.Comment.Visible = False
Target.Comment.Text Text:="The value is above 150"
Else
Target.ClearComments
End If

End Sub

Now, if you just want a visible flag to indicate when a value goes
above/below or reaches a specific value, then you could look into Conditional
Formatting. You can use that [via Format | Conditional Formatting in the
menu toolbar] to set the appearance of a cell based on the value of the cell
itself. This might be a better solution for you since it involves no coding,
is easier to apply to a large number of cells, especially if those cells are
spread out around the worksheet.

"Desmond" wrote:

Can Excel create a conditional Comment on a cell? i.e. if cell value is above
a value, create a comment ("Value is Very High = 'Cell Value' ")

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Create comment from cell range MikeG Excel Discussion (Misc queries) 2 September 26th 06 07:19 PM
Can I do conditional formula based on data in cell comment? da@DRI Excel Discussion (Misc queries) 4 August 18th 06 05:31 PM
How do I create a comment on an unlocked cell in a protected sheet LObeidat Excel Discussion (Misc queries) 1 July 25th 06 01:14 PM
Can I create a conditional format in a cell using a value from an. thrasher Excel Discussion (Misc queries) 3 February 4th 05 05:17 PM
How to create Multiple Conditional Formulas in a single cell? Maxfx Excel Discussion (Misc queries) 2 February 1st 05 02:26 PM


All times are GMT +1. The time now is 11:10 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"