Forum Discussion

Wrake's avatar
Wrake
Copper Contributor
Mar 26, 2024

Font used for Excel Notes

I have a large spreadsheet with hundreds of comments (now called Notes) created in an old version of Excel. I am updating this spreadsheet using Excel 365. All the old notes used Tahoma 9 point font. Everything I type in when updating is in MS Sans Serif 10 point font. This looks a mess and changing either the new or the old text to match the other font is a massive job. It appears that I cannot change the default font for new text to match the old font. Has anyone developed a macro that would change all the text in all the notes to the new font?

  • JKPieterse's avatar
    JKPieterse
    Silver Contributor

    Wrake Sure!

    Sub UpdateComments()
        Dim cmnt As Comment
        Dim sht As Worksheet
        For Each sht In ActiveWorkbook.Worksheets
            For Each cmnt In sht.Comments
                With cmnt.Shape.TextFrame.Characters.Font
                    .Name = "MS Sens Serif"
                    .Size = 10
                End With
            Next
        Next
    End Sub

    (Update font name and size as needed)

    • Wrake's avatar
      Wrake
      Copper Contributor
      Thanks for that. It works fine. Takes 10 to 15 minutes, but only once per workbook.
      • JKPieterse's avatar
        JKPieterse
        Silver Contributor
        Perhaps adding Application.ScreenUpdating = False before the start of teh For statement will speed things up a bit.

Resources