Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, 2013, and 2016. 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

by Allen Wyatt
(last updated January 13, 2018)

5

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, and 2016. 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

Forcing the Properties Dialog Box to Appear

Do you want the Properties dialog box to appear when you first save a Word document? You can configure Word so that it ...

Discover More

Working with Imperial Linear Distances

Excel works with decimal values very easily. It is more difficult for the program to work with non-decimal values, such ...

Discover More

Selecting a Cell in the Current Row

Macros often need to select different cells in a worksheet. Here's how you can use macro commands to change which cell is ...

Discover More

Solve Real Business Problems Master business modeling and analysis techniques with Excel and transform data into bottom-line results. This hands-on, scenario-focused guide shows you how to use the latest Excel tools to integrate data from multiple tables. Check out Microsoft Excel 2013 Data Analysis and Business Modeling today!

More ExcelTips (ribbon)

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

Linking Comments to Multiple Cells

In Excel, single comments are associated with single cells. If you want to have a comment be linked to multiple cells, ...

Discover More

Copying Comments to Cells

Need to copy whatever is in a comment into a cell on your worksheet? If you have lots of comments, manually doing this ...

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}] 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 3 - 3?

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.