Search TeachExcel.com
TeachExcel.com
TE
Teach Excel MS Office Tutorials Excel Consulting Services Excel Forum
Excel Video Tutorials Excel Tips Free Excel Macros Excel Help Resources Contact TeachExcel
Video Tutorials
  • Free Macros
  • Excel Help Directory
  • Excel 2007 Resources
  • Keyboard Shortcuts
  • Excel Forum
  • Contact/About

Macros
Excel Tutorials For Macros

Delete Comments in Excel - Permanently Remove Specific Comments from Excel


Bookmark and Share

Delete a comment in Excel with this macro. You can permanently remove or delete a specific comment or many comments using this macro. The benefit of this macro is that you can specify exactly which comments you want deleted.

To use this macro, simply replace the range reference A1 with the reference of the cell that contains the comment which you want to delete.
Where to install the macro:  Module

Excel Macro to Delete Comments in Excel - Permanently Remove Specific Comments from Excel

Sub Remove_Specific_Comment()
'This macro deletes the comment from cell A1 in Excel

Range("A1").Comment.Delete

End Sub


Bookmark and Share


How to Install the Macro
  1. Select and copy the text from within the grey box above.

  2. Open the Microsoft Excel file in which you would like the Macro to function.

  3. Press "Alt + F11" - This will open the Visual Basic Editor - Works for all Excel Versions.  Or For other ways to get there, Click Here.

      For Excel Versions Prior to Excel 2007
      Go to Tools > Macros > Visual Basic Editor

      For Excel 2007
      Go to Office Button > Excel Options > Popular > Click Show Developer tab in the Ribbon. Then go to the Developer tab on the ribbon menu and on the far left Click Visual Basic

  4. On the new window that opens up, go to the left side where the vertical pane is located. Locate your Excel file; it will be called VBAProject (YOUR FILE'S NAME HERE) and click this.

  5. If the Macro goes in a Module, Click Here, otherwise continue to Step 8.

    1. Go to the menu at the top of the window and click Insert > Module
    2. Another window should have opened within the Visual Basic Editor's window. Within this new window, paste the macro code. Make sure to paste the code underneath the last line of anything else that is in the window.
    3. Go to Step 8.

  6. If the Macro goes in the Workbook or ThisWorkbook, Click Here, otherwise continue to Step 8.

    1. Directly underneath your excel file called VBAProject(your file's name here), click the Microsoft Excel Objects folder icon to open that drop-down list.
    2. Then, at the bottom of the list that appears, double-click the ThisWorkbook text.
    3. A new window inside the Visual Basic Editor's window will appear. In this new window, paste the code for the macro. Make sure to paste this code underneath the last line of any other code which is already in the window.
    4. Go to Step 8.

  7. If the Macro goes in the Worksheet Code, Click Here, otherwise continue to Step 8.

    1. Directly underneath your excel file called VBAProject(your file's name here), click the Microsoft Excel Objects folder icon to open that drop-down list.
    2. Within the list that appears you will see every worksheet that is in that excel file. They will be listed as such: Sheet1(NAME OF SHEET HERE) and under that will be Sheet2(NAME OF SHEET HERE). Select the sheet in which you want the macro to run and double-click that sheet.
    3. A new window inside the Visual Basic Editor's window will appear. In this new window, paste the code for the macro. Make sure to paste this code underneath the last line of any other code which is already in the window.
    4. Repeat steps b and c for every sheet you want the macro to work in. Putting the macro in one sheet will not enable it for any other sheets in the workbook.
    5. Go to Step 8.

  8. Close the Microsoft Visual Basic Editor window and save the Excel file. When you close the Visual Basic Editor window, the regular Excel window will not close.

  9. You are now ready to run the macro.



Similar Helpful Excel Resources

Cannot Remove Comments In Excel Worksheet - Excel

View Content
I have a workbook that I received from a vendor that when I click in a cell a comment appears. There is no line or comment indicator for each comment. So I went into the tools - options - views - comments section and chose no comments. The comments still appear and when I go to the tool bar - view - comments nothing appears. I checked for any VBA code and didn't see anything. I was able to get around this problem by copy/paste special into a new worksheet, but curiosity is killing this cat. Any ideas?

Comments Border Disappeared, Don't Display When Mouse Dragged Over Comments - Excel

View Content
Hi, I've just tried pasting something into a new Comment and accidentally hit some keys on my laptop and it's messed up my Comments. I have had this once before, but can't remember how I fixed it.

Comments have lost their Borders.

When you EDIT Comment it stays displayed on spreadsheet - i.e. it doesn't just return to the Cell and Indicator.

However, the text in the Comments is still there.

When you hover the mouse over any cells with Comments, nothing is displayed.

I have gone into Tools-Options-General and made sure Indicator+Comments is selected. Objects is Hide All.

Any ideas???

The Silver Fox

Vba: How To Remove Comments Row That Start With ; - Excel

View Content
The only part I don't know is how to ID the string start with ;

Thanks!

Remove Lines From Comments - Excel

View Content
Here is a picture example of what I mean, just randomly found on google:
http://www.projectwoman.com/uploaded...ent-763577.jpg

Maybe an insignificant thing I want, but can the line from the comment connecting to the red indicator be removed? Added an example since my comments show up below the selected cell with VBA code.

Remove Comments In A Range - Excel

View Content
Hello,
Is there vba code that can remove comments in a range that a user selects in a workbook? The range may or may not have comments in all cells selected.

Ex: Comments in Cells A1 & B3. User selects range A1:B10 and runs macro to remove comments.

Thanks

Remove/hide Comments - Excel

View Content
I would like to remove all green little comments on a column of mine saying "The number in this cell is formatted as text or preceded by an apostrophe" without converting it to a number.

Is this possible to do via code? I tried recording a macro when I chose to ignore them but nothing showed up in the VBA editor :-\

Get Count, Based On Comments From Specific Months Of Specific Years - Excel

View Content
How to explain this one..

On Sheet2 Column J2:J9999 I have 5 different Text values on of them is "NO RA".

On Sheet2 Column C2:J9999 I have the Date for which that data was entered.

How can I count how many cells have the value "NO RA" in December 2008? But i need this to count based on the month and the year as i have 4 years of data and dont want it to also count "NO RA" values from other years from that same month?

Hope that made any sense?

Thnak to anyone who understand what im in need of with this one

Add / Remove Comments To A Protected Sheet - Excel

View Content
Hi,

I have a protected sheet in which i have unlocked the majority of the cells as i only need a few to be locked. However, i cant seem to be able to add or remove comments to the unlocked cells and i cant see anythign about comments in the 'allow' list when protecting the sheet.

Anyone got any ideas how i can get roudn this?

Thanks

Remove Comments Showing Up On Mouse-over? - Excel

View Content
Hmm maybe the title is a little vague .. but it will work;

In the example added a code is running to show the comments (pictures) when the cell is selected. This way you don't have to mouse-over to show the comment, you just use your arrow keys.. Is there a way to not show comments on mouse-over? I only want them to show while the cell is selected, using the VBA code. Because now you can show 2 comments while a cell is selected, and you put your cursor on another cell.

Marco

Function Used To Add/remove Cell Comments - Excel

View Content
Hi all,

This is my second recent post. Have been working on an Excel project for too long now. My background is in C, not VB. So bear with me. Now the questions...

I want to write a function to handle all my cell comments needs. The way I am approaching this, I will actually need 2 functions.
The first function needs to create a string from a list. Either from a cell list in Excel or from the Access database it will be in. Either way I want it to look like a list in the cell comment when it is done.
Second function will be multi-purpose. I know how to pass arguments in C. But in VB it's a little fuzzy for me. Well this is what it should do. It will have 3 arguments 1. List or Msg as string, 2. Task as integer, 3. cell location as ?. I will use a select case to perform the selected task.
task will have 3 possible values
0 - delete comment
1 - add a new comment list
2 - hide comment
The code should flow like this
1. delete any existing comments for that cell
2. select case which task was selected (1,2)
3. reset the comment position

My next question is does this seem the right way to go? There will be at least 50-100 cell comments on a worksheet. When the workbook opens all 100 comments will have to be updated. I will have to call this function 100 times.

Thanks for any help in advance

Random Tutorials
Extract Text from Cells - Intermediate Example
(Intermediate)
HLOOKUP() Function - Introduction
(Intermediate)
Absolute and Relative Cell References
   - & INDIRECT() Function Introduction

(Easy)
How to record a Macro - And what One is
(Easy)
Assign a Macro to a Button and Toolbar
(Intermediate)
Formatting Worksheets for Printing in Excel
(Easy)
Submit Inquiry Here
  • Prices From $10
Name:*
E-mail:*
Request:*
The macro(s) on this page will be sent with the request.
Contact | Privacy Policy | Disclaimer
Copyright© 2012 TeachExcel.com