Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365. If you are using an earlier version (Excel 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Excel, click here: Anchoring Comment Boxes in Desired Locations.
Written by Allen Wyatt (last updated October 7, 2021)
This tip applies to Excel 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365
Bill is creating a form using Excel, and he has attached comments to the column headings to remind people what goes in each column. When the mouse pointer is moved over the column heading, the comment box always pops up to the right of the column, which is a problem for those columns near the right side of the screen—the boxes appear off the screen, to the right of the column. Bill wondered if there is a way to tell the comment box where it should pop up.
The short answer is that there isn't any way to control where the pop-up comment box will appear; it always appears to the right, and it's position is always reset every time the pop-up action occurs. If you configure Excel so that comment boxes are always visible (i.e., they don't "pop up"), then you can position the individual comment boxes. Follow these steps:
Figure 1. The Advanced options of the Word Options dialog box.
The comments should now be visible, and you can position them as desired. The drawback to this approach, of course, is that if you have a lot of comments in your worksheet, the screen can appear quite cluttered. If you change back so that only the comment indicator is shown, then the positions you set are lost, and the pop-ups (when you move the mouse pointer over the cell) again appear to the right of the cell.
Another approach to displaying the comments you want is to use the data validation feature in Excel instead of actual comments. (You can use the Input Message tab of the Data Validation dialog box to set the message to be displayed when the cell is selected.) There are a couple of operational differences between the data validation input messages and the regular comments. First, the message is best associated with the actual input cell, not with any header cell for the column. (This way the message is displayed when the user actually starts to make input.) Second, a cell for which there is an input message does not have a small indicator in the upper-right corner, as is the case with comments.
The benefit to using the data validation input messages is that the message will always be visible on the screen; it does not default to displaying to the right, as comments do. In addition, you can manually position the messages where you want, and Excel remembers that position.
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (7559) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365. You can find a version of this tip for the older menu interface of Excel here: Anchoring Comment Boxes in Desired Locations.
Excel Smarts for Beginners! Featuring the friendly and trusted For Dummies style, this popular guide shows beginners how to get up and running with Excel while also helping more experienced users get comfortable with the newest features. Check out Excel 2013 For Dummies today!
When using macros to process comments, it is best to know the various ways that those comments can be accessed. This tip ...
Discover MoreComments can be a boon when you want to annotate your worksheets. If you want, you can instruct Excel to print the ...
Discover MoreIn Excel, single comments are associated with single cells. If you want to have a comment be linked to multiple cells, ...
Discover MoreFREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
2018-11-21 10:04:36
James Woolley
@Sean, you might consider the MoveComments macro described here: http://www.contextures.com/excelcommentmacros.html
2018-11-20 19:35:47
Great site, will help me very much, thank you. I have a question however i.e. I have a spreadsheet of a few hundred rows and some 18 columns. In each row there ire comments added to typically 4 cells in each row. Some time back evertything went haywite and all that shows now are lines from cell leading to no comments but they go all over the place. Is there a way to get this back under control or have I just put too much data in for the program to manage showing comment upon hovering over those particular cells? Any help very much appreciated. I also tried to sign up for the email tips but wouldn't allow me to. If this is an option still my email is sean@tradeark.com.au if you could include it in that mailing list?
Hopoe you are all well, wherever you are :)
2018-08-20 12:30:41
Willy Vanhaelen
@Teal
That has to do with hidden columns. Excel remembers the position relative to the window at the moment of creation/editing. If you afterwards hide columns and try to edit the comment, Excel displays it at the position of the screen as where those columns still unhidden but the column is elsewhere now, hence... I consider this as a bug and it is very annoying indeed.
To avoid this you have to unhide the columns first before editing a comment: also annoying. Or you can use this little macro which fixes what Microsoft didn't up to now:
Sub MoveComment()
On Error GoTo NewComment 'In case there is no comment in the active cell yet
With ActiveCell.Comment
.Shape.Left = .Parent.Offset(0, 1).Left + 10
.Shape.Top = .Parent.Top + 5
End With
NewComment:
Application.SendKeys "+{F2}", True
End Sub
Whether or not you have hiden columns/rows, the macro positions the comment near the cell it belongs to and then opens it for editing. If you put this macro in your Personal Workbook, you can assign it a shortcut key or/and create a button in the QAT so you can use it instead of pressing Shift+F2 or choose Edit Comment from the (context) menu.
I have assigned it Ctrl+Shift+F2 which you can do by inserting the following in the ThisWorkbook Code Sheet:
Private Sub Workbook_Open()
Application.OnKey "^+{F2}", "MoveComment"
End Sub
You can "play" with the + 5 / +10 to suit your needs. Let me know if you like it.
2018-08-19 10:20:35
J. Woolley
@Teal, you might consider the MoveComments macro described here: http://www.contextures.com/excelcommentmacros.html
2018-08-18 07:56:25
Teal
Is there a way to keep the comment box next to the actual cell it was created for? I will crest a comment for that cell on my budget and when I go to “edit comment” that box is now at least 15 or more columns over and I continually have to drag it back over to be next to the cell I’m working on.
2018-01-14 15:28:27
Mandora
A tip from Contextures that allows user to place comments on the screen in a place designated by the user. I have used it and it works.
Public Sub Worksheet_SelectionChange(ByVal Target As Range)
'www.contextures.com/xlcomments03.html
'This code places comments in a central location in window when cell is selected. _
Some adjustments can be made in the cTop, cWidth code below.
'NOTE: The commented cell must have protection unlocked in the cell's properties.
Dim rng As Range
Dim cTop As Long
Dim cWidth As Long
Dim cmt As Comment
Dim Sh As Shape
Application.DisplayCommentIndicator = xlCommentIndicatorOnly
Set rng = ActiveWindow.VisibleRange
cTop = rng.Top + rng.Height / 15 'Default is 2 which places comment near middle of window
cWidth = rng.Left + rng.Width / 1.5 'Default is 2 which places comment near middle of window
If ActiveCell.Comment Is Nothing Then
'do nothing
Else
Set cmt = ActiveCell.Comment
Set Sh = cmt.Shape
Sh.Top = cTop - Sh.Height / 15 'Default is 2 which places comment near middle of window
Sh.Left = cWidth - Sh.Width / 1.5 'Default is 2 which places comment near middle of window
cmt.Visible = True
End If
End Sub
2018-01-14 11:55:36
Hello Allen,
I've used the comments as a reminder to myself as to where I was at in developing a spreadsheet, and for turning over a spreadsheet for others to use. Often it provides that sort of "tool tip" feature to save repeating instructions, etc. What I have found is that by adding many of the comment related buttons to a customized ribbon section I can access and essentially scroll through all the comments quickly, show or hide all, etc., so that they serve their purpose but then remain out of the way. I have six buttons - New comment, Previous comment, Next comment, Delete, Show/Hide, Show All. Maybe this method will be helpful for others.
Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.
FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
Copyright © 2024 Sharon Parq Associates, Inc.
Comments