How to Reset Comment Position in Excel (With Easy Steps)

Get FREE Advanced Excel Exercises with Solutions!

Sometimes while working on excel, we insert too many comments and notes, and often their position is needed to change so that they don’t hide the necessary data behind them on the worksheet. But subsequently, we may need to reset the comment position. In this article, I will show you how to reset comment position in excel.


Download Practice Workbook

Download this practice workbook to exercise while you are reading this article.


Step-by-Step Procedures to Reset Comment Position in Excel

To reset comment position in excel, I have divided the whole process into 3 very simple and straightforward steps for convenience. In the first step, we will open the visual basic editor. In the 2nd step, we will write the code on the visual basic editor. Finally, we will run the code and get our desired result. So not wasting time anymore, let’s start the process with the first step. But before discussing the solution, let’s see what the problem looks like. Here is a picture of an excel worksheet where the default positions of comments have been changed for some reason.

how to reset comment position in excel

Now, we want to reset their positions. We can do that by running a VBA Code. It is a super easy process. You just only need to run a VBA code and the code will itself automatically reset the position of the column. Follow the steps below.


Step 01: Open Visual Basic Editor

Excel allows us to codify customized instructions in the Visual Basic Language. To write code, excel provides an editor. In the first step, we will be opening the editor.

  • First of all, open the Visual Basic Editor. To do that, first, go to Developer Tab and then click on Visual Basic. You can also use the shortcut key Alt+F11.

  • Now You should see a Visual Basic Editor window like this.

  • As we can see, the editor is currently empty. So, we need to insert a new module here.
  • After that, click on Insert and then Module.

how to reset comment position in excel

  • Consequently, you will see an empty module like this below.

how to reset comment position in excel

  • Now the only tasks remaining are to write code and run it.

Read More: Creating and Editing Comments in Excel (4 Practical Examples)


Step 02: Enter Code in Editor

  • Here a code is given below. First, copy the code by pressing Ctrl+C and then paste the VBA code into the Editor by pressing Ctrl+V.
Sub ResetComment()
Dim rComment As Comment
For Each rComment In Application.ActiveSheet.Comments
   rComment.Shape.Top = rComment.Parent.Top + 5
   rComment.Shape.Left = rComment.Parent.Offset(0, 1).Left + 5
Next
End Sub
  • The code on the editor should look like this.

how to reset comment position in excel

  • Now the only task remaining is to run the code.

Read More: How to Copy Comments in Excel (2 Suitable Ways)


Similar Readings


Step 03: Run VBA Code

  • So, you can run the code by clicking the Run command on the command bar or pressing the F4 key.y

how to reset comment position in excel

  • After running the code, you will see that all the comments’ positions have reset to default.

how to reset comment position in excel

Read More: How to Change Default Comment Font Size in Excel


Things to Remember

  • You need to save the current excel file in .xlsm( macro-enabled file) format if you want to further use the code in the future

Conclusion

That is the end of this article. I hope, now you have a clear understanding of how we can reset comment position in excel. If you find this article helpful, please share this with your friends. Moreover, do let us know if you have any further queries. Finally, please visit Exeldemy for more exciting articles on Excel.


Related Articles

Aniruddah Alam

Aniruddah Alam

Hi, I am Md. Aniruddah Alam from Dhaka, Bangladesh. I completed my Bachelor's degree in Naval Architecture from BUET. Currently, I am working as an Excel and VBA Content Developer. Here, I always try to present solutions to Excel-related problems in a very concise and easy-to-understand manner. In my leisure time, I love to read books, listen to podcasts, and explore new things.

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo