Please Note: This article is written for users of the following Microsoft Excel versions: 97, 2000, 2002, and 2003. If you are using a later version (Excel 2007 or later), this tip may not work for you. For a version of this tip written specifically for later versions of Excel, click here: Editing a Comment Close to Its Cell.

Editing a Comment Close to Its Cell

Written by Allen Wyatt (last updated April 16, 2022)
This tip applies to Excel 97, 2000, 2002, and 2003


1

Peggy has several cells in a worksheet that have comments associated with them. When she right-clicks on one of these cells, she can choose Edit Comment from the resulting Context menu in order to edit the comment. If the comment was one she created in a previous session with Excel, it is not unusual for the comment to open up elsewhere in the worksheet, sometimes several screens away. Peggy is wondering if there is a way to make the comment appear next to the cell it goes with.

This condition can be caused by several things. For instance, it is possible that while previously editing the comment, you clicked the comment box's border and dragged the comment to a different place on the worksheet. If you did this, then Excel remembers where the comment was moved to and always displays it in the remembered location.

Another common cause is that you do some filtering on your data, which results in some of the rows or columns being hidden while the filter is in place. If you then edit comments in the filtered cells, you have effectively "moved" the comment from the original location to a new location that is associated with the row or column visible on the screen. When you later remove the filter and try to edit the comment, it remembers where it was previously edited, and that is where the new editing opportunity takes place.

In both of these instances, the normal solution is to just grin and bear it—manually move the cells from where they are to where you want them. However, if you have this problem with a lot of cells, all the manual moving can be a real bother. In that case, you may want to use a macro to do the moving for you.

Sub MoveComments()
  Dim cmt As Comment
  For Each cmt In ActiveSheet.Comments
    With cmt
      .Shape.Top = .Parent.Top
      .Shape.Left = .Parent.Offset(0, 1).Left
    End With
  Next
End Sub

This macro moves all the comments in a worksheet so that their upper-left corner is the same as the upper-right corner of the cell to which they are attached. This puts the comments right next to their cells, which is where you want them.

Note:

If you would like to know how to use the macros described on this page (or on any other page on the ExcelTips sites), I've prepared a special page that includes helpful information. Click here to open that special page in a new browser tab.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (3269) applies to Microsoft Excel 97, 2000, 2002, and 2003. You can find a version of this tip for the ribbon interface of Excel (Excel 2007 and later) here: Editing a Comment Close to Its Cell.

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

Setting the AutoRecover Directory

Excel, by default, periodically writes information to AutoRecover files that can help protect your data in case Excel is ...

Discover More

Debugging a Macro

Part of writing macros is to make sure they work as you expect. This involves a process known as debugging. Here's how ...

Discover More

Dragging and Dropping Pictures in a Document

Do you like to add pictures to your document just by dragging and dropping? What are you to do if it appears the ...

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 (menu)

Comments Don't Appear when Cell is Pointed To

One way that you can view comments in a worksheet is to have them appear when you hover the mouse pointer over a cell. If ...

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

Finding and Replacing Text in Comments

Excel allows you to add comments to individual cells in your workbook. Unfortunately, Excel doesn't provide a way to ...

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 + 8?

2022-06-20 23:50:06

Peter

One of the other things Excel does to comments is to shrink the height to zero.
So a useful addition to the above is
.Shape.Height = .Parent.Height * 3
I found the factor of 3 appropriate in my case. Adding .Width is optional.


This Site

Got a version of Excel that uses the menu interface (Excel 97, Excel 2000, Excel 2002, or Excel 2003)? This site is for you! If you use a later version of Excel, visit our ExcelTips site focusing on the ribbon 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.