View Single Post
  #2   Report Post  
Dave Peterson
 
Posts: n/a
Default

Pretty general question.

If it's only one cell, copy the value and insert/edit the other cell's comment
and paste.

If it's lots of cells, you could use a macro.

But since you didn't give any real details, here's a pretty generic userdefined
function that might help you:

Option Explicit
Function CopyValToComment(FCell As Range, TCell As Range)

Application.Volatile

If TCell.Comment Is Nothing Then
'do nothing
Else
TCell.Comment.Delete
End If

TCell.AddComment Text:=FCell.Text

CopyValToComment = "UsedToCopyToComment" 'or "" to show as empty.

End Function

Then I could put this in any cell:
=CopyValToComment(A1,B1)
or even:
=CopyValToComment([book1.xls]sheet2!a3,[book2.xls]sheet1!a5)

After you've populated the comments you want, you can either delete the formulas
(if the comments shouldn't change) or keep the formulas (if the comments should
change when the sending cell changes value).



spot987654321 wrote:

am trying to insert specific (other) cell values into another cell comment
field.


--

Dave Peterson