Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question

2 Answers 2

up vote 2 down vote accepted

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
share|improve this answer
    
This VB script will not work for the entire range of cells - it will only work for the 1st cell in a range. –  caliban Sep 16 '09 at 15:52
    
Have adjusted it to work on whole selection –  JDunkerley Sep 16 '09 at 15:55
    
Code didn't work in Excel 2007. –  caliban Sep 16 '09 at 16:15
    
@Caliban: Works perfectly for me in Excel 2007. –  Martin Sep 16 '09 at 19:10
    
Best guess (as I dont have the sheet you ran it on), was that there were existing comments in the cells which would break it (though trivial to fix) –  JDunkerley Sep 16 '09 at 20:17

Refer to this thread on ozgrid for automated conversion of cell values to cell comments. Requires a certain level of savvy /w VB macros.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.