Modificar tamaño y forma de varios comentario en una misma hoja de excel

Copper Contributor

Buenas tardes, me entregan una hoja de Excel con cerca de 5 mil comentarios los cuales tiene diferentes formas y tamaños algunos no se visualizan bien, me justaría saber si existe alguna forma de unificar o modificar la forma de visualizar todos los comentarios de una hoja de Excel con un mismo tamaño y tipo de letra, sin tener que ver cada uno y ajústalo manualmente.

1 Reply

@abelgarcia29 

Format worksheet comments

As far as I know (maybe I'm wrong, who knows), however, in Excel you have to format them individually. But you can also use third-party tools, just search the Internet.

Here is a small example, without guarantee.

At the same time there is the possibility to do it with VBA, here is an example code (untested but should work :):

 

Sub FormatAllComments()
  Dim ws As Worksheet
  Dim cmt As Comment
  For Each ws In ActiveWorkbook.Worksheets
    For Each cmt In ws.Comments
      With cmt.Parent.Offset(-1, 1)
        cmt.Shape.Top = .Top + .Height / 2
        cmt.Shape.Left = .Left + 11
        cmt.Shape.TextFrame.AutoSize = True
        cmt.Shape.TextFrame.HorizontalAlignment = xlLeft
        cmt.Shape.TextFrame.Characters.Font.Name = "Arial"
        cmt.Shape.TextFrame.Characters.Font.Size = 12
        cmt.Shape.TextFrame.Characters.Font.Bold = False
      End With
    Next cmt
  Next ws
End Sub 

 

Since I do not know which Excel version and which operating system it is, I am sending you the attached information and links.

 

Hope I could help you with that.

 

NikolinoDE

I know I don't know anything (Socrates)