View Single Post
  #2   Report Post  
Jason Morin
 
Posts: n/a
Default

If you want to copy a range of values into a comment, here's a start. Select
the range of values first, then run the macro. It'll prompt you for a cell
location to which you'll create a comment containing the values.

Sub CopyIntoComment()
Dim cell As Range
Dim strAllCells As String
Dim strComLocation As String

If Intersect(ActiveSheet.UsedRange, Selection) Is Nothing Then
MsgBox "Nothing selected."
Exit Sub
End If

strComLocation = InputBox("Enter cell where comment will go:")
If strComLocation = "" Then Exit Sub

For Each cell In Selection
strAllCells = strAllCells & cell
Next

With Range(strComLocation)
If Not .Comment Is Nothing Then
MsgBox "Comment already in cell."
Exit Sub
End If
.AddComment
.Comment.Text Text:=strAllCells
End With

End Sub

---
HTH
Jason
Atlanta, GA


"CoolKerala" wrote:

how do i paste copied values in a comment