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.

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


7

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:

  1. Display the Excel Options dialog box. (In Excel 2007 click the Office button and then click Excel Options. In Excel 2010 or a later version display the File tab of the ribbon and then click Options.)
  2. At the left side of the dialog box click Advanced.
  3. Scroll down until you see the Display options. (See Figure 1.)
  4. Figure 1. The Advanced options of the Word Options dialog box.

  5. Select the Comments and Indicators radio button.
  6. Click on OK.

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.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Using the Organizer to Manage Macros

There may come a time when you want to copy or rename macros. You can do this quite easily by using the Organizer tool ...

Discover More

WordTips: The Macros

Word includes a powerful macro programming language called Visual Basic for Applications. WordTips: The Macros can ...

Discover More

Limiting Number of Characters in a Cell

Need to limit the number of characters that can be entered into a cell? One easy way to do it is through the use of Data ...

Discover More

Program Successfully in Excel! John Walkenbach's name is synonymous with excellence in deciphering complex technical topics. With this comprehensive guide, "Mr. Spreadsheet" shows how to maximize your Excel experience using professional spreadsheet application development tips from his own personal bookshelf. Check out Excel 2013 Power Programming with VBA today!

More ExcelTips (ribbon)

Printing Formatted Comments

When you print your worksheet, you may want Excel to include your comments or notes as they appear on the screen. Here's ...

Discover More

Changing Comment Color for a Single User

The default color used to format comments is determined by Windows, not Excel. You can adjust the formatting of ...

Discover More

Automatically Placing Text in a Comment

Want to automatically move the contents of a cell into a comment for that cell? It's easy enough to do by using the macro ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is 2 + 2?

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

Sean

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

Marty Plante

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.


This Site

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.

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.