cell content into a note
Hi Gord
You are quite right. Thanks for picking that up.
I only tested with a first run through, didn't try again after comments had
been added to cells.
Hard slap on wrist duly administered<bg
--
Regards
Roger Govier
"Gord Dibben" <gorddibbATshawDOTca wrote in message
...
Roger
Your macro will crash if column A already has Comments, giving user no way
to
edit column B long descriptions and re-Comment without deleting orignal
Comment
in A
I amended to this..........
Sub CopyDescToComment()
Dim lr As Long, i As Long
lr = Cells(Rows.Count, "A").End(xlUp).Row
For i = 1 To lr
If Cells(i, 1).Comment Is Nothing Then
Cells(i, 1).AddComment
Cells(i, 1).Comment.Text Text:="" & Cells(i, 2).Value
Else
Cells(i, 1).Comment.Text Text:="" & Cells(i, 2).Value
End If
Next
Columns("B:B").EntireColumn.Hidden = True
End Sub
Gord Dibben MS Excel MVP
On Thu, 1 Nov 2007 23:42:04 -0000, "Roger Govier"
<rogerattechnology4NOSPAMu.co.uk wrote:
Hi Chuck
This small macro should do the trick
Sub CopyDescToComment()
Dim lr As Long, i As Long
lr = Cells(Rows.Count, "A").End(xlUp).Row
For i = 1 To lr
Cells(i, 1).AddComment
Cells(i, 1).Comment.Text Text:="" & Cells(i, 2).Value
Next
Columns("B:B").EntireColumn.Hidden = True
End Sub
Copy the macroAlt+F11Insert ModulePaste code into white paneAlt+F11 to
return to Excel sheet.
ToolsMacroRunhighlight macro nameRun
|