Excel: Move cell contents to comment

microsoft excelmicrosoft-excel-2007

I'm using Excel 2007.

I have a list of items and wish to take the information in the cells of one column and move it into comments for the cells in that column.

Is there a way to do this that doesn't involve manually cutting the cell content then creating a comment and pasting the text in?

Best Answer

The following VBA code will move the text values of the selected cells into the comments. It will only work if there arent any existing commnets

Sub Test()
    For i = 1 To Selection.Rows.Count
        For j = 1 To Selection.Columns.Count
            Selection.Cells(i, j).AddComment (Selection.Cells(i, j).Text)
        Next
    Next
End Sub
Related Question