MrExcel Publishing
Your One Stop for Excel Tips & Solutions

AH HA!! I Think I Have The Ultimate Challenge?


Posted by tony on March 17, 2001 5:44 AM

I sent a previous message,"Using Conditional_Formatting
to show Comment" and so far no one seems to have an
answer for me. In fact I see where other questions
submitted after mine have been answered. Perhaps I
have been rude and butted into a group I'm not a part
of (I've noticed that most of the messages seem to be
between a certain group of people) I have searched the main message board and the archived section for answer to my
question, but so far have found none. I did find a lot of other helpful
answers, and for those I thank each of you.
If some one does have an answer to my question, I
really would appreciate if you would post an answer.
If there is no answer to my question, I would also
appreciate if some one would post a message saying that
also.

(Please!, Thank You!, Oh! Pretty Please!!, Thank You,
Thank You, Thank You!! Help!!!, and any other
grovelling pleas that might help me to get an answer!!!

Your most "Umble" (Like from Charles Dickens) Plea-nt(sp?),
Tony


Posted by Dave Hawley on March 17, 2001 9:22 PM

Hi Tony

I must have overlooked your previous question. I have read it now though! You will certainly need VBA for this and placed in the sheet module.

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count > 1 Then Exit Sub
If Target.Column = 28 Then ' Column AB
If Target <> Range("N" & Target.Row) Then
With Target
.AddComment
.Comment.Text Text:="Please correct your entry"
.Comment.Visible = True
End With
Else
On Error Resume Next
Target.Comment.Delete
End If
End If
End Sub

This will add a comment to cell ABWhatever if the entered amount does not equal the cell in Column N on the same row. If it does, the comment will be deleted.


Dave

OzGrid Business Applications