This post will guide you how to insert a comment into two or multiple cells in Excel. How do I add comment to multiple cells with VBA Macro in Excel 2013/2016.
Insert Comment into Multiple Cells
Assuming that you have a list of data in range B1:B5, in which contain some text values, and you want to insert a comment into those cells in Excel, how to accomplish it. You can use Paste Special feature to achieve the result. Just do the following steps:
Step1: select Cell B1, and then inert into a comment. then copy this cell by pressing Ctrl + C keys on your keyboard.
Step2: select the rest cells in your range B1:B5, and then right click on it. select Paste Special menu from the context menu list, and the Paste Special dialog will open.
Step3: choose Comments option under Paste section in the Paste Special dialog box. click Ok button.
Step4: you would see that one comment has been added into all selected range of cells.
Insert Comment into Multiple Cells with VBA Macro
You can also use an Excel VBA Macro to add one comment to multiple cells in Excel. Just do the following steps:
Step1: open your excel workbook and then click on “Visual Basic” command under DEVELOPER Tab, or just press “ALT+F11” shortcut.
Step2: then the “Visual Basic Editor” window will appear.
Step3: click “Insert” ->”Module” to create a new module.
Step4: paste the below VBA code into the code window. Then clicking “Save” button.
Sub InsertCommentsIntoMultiCells() Set myRange = Application.Selection Set myRange = Application.InputBox("choose one range that you want to add comments in:", "InsertCommentsIntoMultiCells", myRange.Address, Type:=8) myComments = InputBox("Enter a Comment that you want to insert" & vbCrLf ) For Each myCell In myRange With myCell .ClearComments .AddComment .Comment.Text Text:=myComments End With Next myCell End Sub
Step5: back to the current worksheet, then run the above excel macro. Click Run button.
Step6:choose one range that you want to add comments in，such as: B1:B5. click Ok button.
Step7:Enter a Comment that you want to insert in the input box. then press Ok button.
Step8: let’s see the result: