Excel VBA: How to Add a Threaded Comment to a Cell

VBA & macros · Updated November 18, 2026

In Excel for Microsoft 365 on Windows, add a threaded comment to a cell with the VBA method Range.AddCommentThreaded. For example, ActiveCell.AddCommentThreaded Text:="Please verify this value." adds a conversation-style comment to the active cell, provided it does not already have a threaded comment.

What a threaded comment is in Excel

A threaded comment is a conversation attached to a cell. It can include replies, which makes it useful when people need to discuss a value or ask follow-up questions without putting the discussion in the worksheet itself. In current Excel versions, threaded comments are generally labeled “Comments” in the interface.

Excel also has Notes, which are the standalone annotations that older versions of Excel called comments. A note does not have a reply thread. That distinction matters in VBA: the older Range.AddComment method creates a note, not a modern threaded comment. If you specifically need a threaded conversation, use Range.AddCommentThreaded where the installed Excel version supports it.

For a small macro, the key idea is simple: identify the target cell and call the threaded-comment method with the text. The surrounding checks are useful because Excel cannot add a second top-level threaded comment to a cell that already has one.

The VBA method to use

The relevant method belongs to the Excel Range object. A single cell is a range, so you can call the method on a cell variable, a worksheet range, or the active cell. Its text argument is the message to post. The comment is associated with the cell, rather than being written into the cell’s displayed value.

For example, this one-line statement adds a threaded comment to the selected cell:

ActiveCell.AddCommentThreaded Text:="Please verify this value."

For reusable code, it is usually clearer to assign the cell to a variable and check whether the cell already has a threaded comment. The CommentThreaded property returns the threaded comment for a range when one exists; when it does not, the property is Nothing.

Complete macro for the active cell

This macro checks the active cell before adding a comment. If a threaded comment is already there, it displays a message rather than trying to add another one.

Sub AddThreadedCommentToActiveCell()
    Dim target As Range

    ' Use the currently selected cell.
    Set target = ActiveCell

    If target.CommentThreaded Is Nothing Then
        target.AddCommentThreaded Text:="Please verify this value."
    Else
        MsgBox "This cell already has a threaded comment."
    End If
End Sub

To change the message, replace the text inside the quotation marks. If the message needs to include a quotation mark, represent it inside a VBA string with two quotation marks. For instance, the string "The reviewer said ""check again""." becomes the displayed sentence “The reviewer said “check again”.”

The macro does not create a reply. It creates the initial threaded comment. A reply is a separate action on the existing conversation, and the exact VBA operations available for working with replies can depend on the Excel object model version. If the task is only to leave a message, adding the initial comment is enough.

Run the macro in Excel

  1. Save a copy of the workbook before running a macro. VBA actions generally cannot be reversed with Ctrl+Z.
  2. If the Developer tab is visible, select Developer > Visual Basic. On Windows, you can also press Alt+F11. On a Mac, the Visual Basic Editor shortcut is commonly Option+F11; some keyboards require Fn as well.
  3. In the Visual Basic Editor, choose Insert > Module, then paste the procedure into the module.
  4. Return to the worksheet, select the cell that should receive the comment, and run the macro from the editor or Excel’s macro list.
  5. Check the cell’s comment indicator and open the comment to confirm the wording and target.

VBA macros must be allowed by Excel’s security settings to run. Do not enable macros in a workbook from an untrusted source merely to use a comment macro. If Excel blocks the procedure, check the workbook’s file type and your organization’s macro policies rather than changing security settings indiscriminately.

Choose the cell deliberately

Using ActiveCell is convenient for a one-off action, but it relies on the selection being correct when the macro runs. If a user selects a different cell by mistake, the comment goes to that other cell. For a fixed destination, refer to the worksheet and address explicitly:

Sub AddCommentToSpecificCell()
    Dim target As Range

    ' Set the worksheet and destination explicitly.
    Set target = ThisWorkbook.Worksheets("Summary").Range("B4")

    If target.CommentThreaded Is Nothing Then
        target.AddCommentThreaded Text:="Confirm the quarterly total."
    Else
        MsgBox "B4 already has a threaded comment."
    End If
End Sub

This example expects a worksheet named Summary and writes to cell B4. Change both the sheet name and address to match the workbook. Qualifying the range with ThisWorkbook is safer than relying on whichever workbook happens to be active, especially when several workbooks are open.

For a macro that should operate on whichever workbook is currently active, ActiveWorkbook may be appropriate, but it is not interchangeable with ThisWorkbook. The latter means the workbook containing the VBA code; the former means the workbook currently selected in Excel.

Threaded comments versus notes

Use a threaded comment when you want a discussion with replies or when collaborators need to respond to a specific cell. Use a note when you want a simple, non-conversational annotation, such as a reminder that does not need a reply. Notes can be useful for older workflows and are not the same feature as threaded comments.

In Microsoft 365 for Windows, the Review tab distinguishes these actions: use Review > New Comment for a threaded conversation, and the Notes controls for a note. The exact placement of Notes controls can vary with the ribbon layout. If you call Range.AddComment in VBA, expect a note; it does not become threaded just because newer Excel versions display both kinds of annotations.

That difference is a frequent source of confusion in older macro examples. A tutorial using AddComment may be perfectly valid for creating a note, but it does not answer a request for a threaded comment. Use the method whose result matches the intended feature.

Common errors and limitations

  • A comment already exists: A cell can have an existing threaded comment, and calling the add method again can fail. Check CommentThreaded first, as in the examples. Decide whether your macro should skip the cell, notify the user, or follow a separate process for handling the existing discussion.
  • Wrong annotation type: If the result is a note rather than a conversation, check whether the code uses AddComment. For a threaded comment, use AddCommentThreaded.
  • Method or property not recognized: Older Excel installations may not expose threaded-comment members in the same way as current Microsoft 365. If VBA reports that AddCommentThreaded or CommentThreaded is not supported, confirm the Excel version and update channel before relying on this code. Do not silently replace it with AddComment unless a note is acceptable.
  • Wrong destination: A macro that uses ActiveCell depends on selection. Use a fully qualified worksheet and cell address when the target is fixed, and verify the result before distributing the workbook.
  • Macro does not run: Confirm that the workbook is saved in a macro-enabled format such as .xlsm, and that macros are permitted by the workbook’s security policy.

Comments are intended for cell-level discussion, not as a dependable storage system for data used by formulas. If a process needs to read, filter, or calculate from a message, put that information in worksheet cells or a structured table instead. Comment text is less visible to formulas and less suitable for routine data processing.

Version, platform, and sharing considerations

This example targets Excel for Microsoft 365 on Windows. Excel for the web can display and work with comments in the interface, but it cannot run VBA macros; run the macro in the desktop Excel application. Excel for Mac supports VBA, but available object-model features can differ by release. Check that the Mac build supports threaded comments and the relevant VBA members before deploying a macro across Windows and Mac users.

Threaded comments are designed for collaboration, but what collaborators can do may depend on their Excel version, account, and how the workbook is stored or shared. A workbook’s comments should not be treated as a guarantee that every recipient can reply in every environment. If a team depends on replies, verify the workflow with the versions and sharing setup the team actually uses.

For a workbook shared with people using older Excel versions, consider whether Notes or a separate discussion log is a better compatibility choice. There is no universal conversion that makes a threaded conversation behave identically as a legacy note; the two features have different capabilities.

Frequently Asked Questions

How do I add a threaded comment to a specific cell in VBA?
Set a Range variable to the destination, then call target.AddCommentThreaded Text:="Your message". Qualify the range with the workbook and worksheet when the destination should not depend on the current selection.

Does Range.AddComment create a threaded comment?
No. Range.AddComment creates a legacy-style note. Use Range.AddCommentThreaded for a threaded comment in Excel versions that support that method.

Can I add a second threaded comment to the same cell?
A cell has one top-level threaded conversation. Check target.CommentThreaded before adding a new one. If a conversation already exists, do not call the add method again without deciding how the existing discussion should be handled.

Can I run this VBA macro in Excel for the web?
No. Excel for the web does not run VBA macros. Open the workbook in desktop Excel for Windows or Mac, using a version that supports the threaded-comment VBA members.

Why does VBA say AddCommentThreaded is not supported?
The installed Excel version or its VBA object model may not support threaded comments. Confirm that you are using a current compatible desktop version. Replacing the method with AddComment creates a note, not an equivalent threaded comment.

Related

Try it: the Column Letter to Number: aA is 27, XFD is 16,384. Converts both ways.

More in VBA & macros

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.