could we make comment automatically comes up if specified cell met some criteria? instead of make some remark in next cell, with “if” formulae
any thought are appreciated.
indra
![]() |
Patch reliability is unclear. Unless you have an immediate, pressing need to install a specific patch, don't do it. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |
Home » Forums » AskWoody support » Productivity software by function » MS Excel and spreadsheet help » automatic comment (Excel 2000)
You could use code in the Worksheet_Calculate event of the worksheet. I’m not sure this is a good idea – it will slow down performance, and it will disable undo.
The code in the worksheet module would look like this:
Private Sub Worksheet_Calculate()
SetComment Range(“M21”)
SetComment Range(“M26”)
SetComment Range(“M33”)
SetComment Range(“M40”)
SetComment Range(“M51”)
SetComment Range(“M60”)
End Sub
In a standard module (the kind you create by selecting Insert | Module in the Visual Basic Editor), create this procedure:
Sub SetComment(oCell As Range)
On Error Resume Next
oCell.ClearComments
If oCell > 1.1 Then
oCell.AddComment “Please contact Yogya”
End If
End Sub
See attached version.
The Worksheet_Calculate event procedure in the worksheet module calls the SetComment procedure for each cell in which you want to set a condtional comment. You can modify the cell addresses, and add or remove lines as needed.
The SetComment procedure starts by removing existing comments, then it checks the value of the cell, and if this is larger than 1.1 (=110%), it sets a new comment. You can change the condition as needed, as well as the text of the comment.
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.
Notifications