Search This Blog

Monday, June 25, 2012

Excel Move comment into cell as text

Sub ExtractComments()

Dim rComm As Range

Dim Comm

Dim sTmp As String

Set rComm = Cells.SpecialCells(xlCellTypeComments)

For Each Comm In rComm

    '// get Comment text string

    sTmp = Comm.Comment.Text

    '// Move it to cell next

    Comm.Offset(0, 1) = sTmp

    '// Now delete the comment

    Comm.Comment.Delete

Next

Set rComm = Nothing

End Sub