View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
AshMorK AshMorK is offline
external usenet poster
 
Posts: 24
Default Cell content as a comment for another cell

thanks Mike for your help, but what i need is something different. For example:

cell A1= "the coment i want to insert"
cell B1= Any caracter

What i want, is to insert a comment in cell B1 showing the text in cell A1
(Comment = "the coment i want to insert")

Thanks again,

"Mike" wrote:

Insert a new module into the workbook (Alt + F11) and pase this code in

Function GetComment(rCommentCell As Range)
Dim thecomment As String
On Error Resume Next
thecomment = WorksheetFunction.Clean _
(rCommentCell.Comment.Text)
GetComment = thecomment
On Error GoTo 0
End Function

Put this in a cell

=GetComment(A1)

If A1 contains a comment it will be returned



"AshMorK" wrote:

Hi,
I need a tool that allow me to show a cell content into a comment for
another cell.

Thanks in advance.

AMK