Text from a comment box into a cell

M

MFS

Hi, is there any solution to extract the text written in a comment box to a
specific cell

I tried the following but this message “#name?†appeared

Select the cell which has the comment
Go to Insert>Name (Define Name in formulas tap) a window will appear
Now insert the following formula in the "Refers to" box -
get.object(12,"comment 1") and give it a name, say trial
In any cell (say A5) where you want to insert the contents of the comments
box, say =trial.

Please check where is my mistake, note that I have Office 2007.
 
J

Jacob Skaria

You can try the below UDF. To try this launch VBE using Alt+F11. Insert
module and paste the below code. Save and close VBE. Get back to workbook.

=GetComment(A1)

Function GetComment(varRange As Range) As String
For Each c In varRange
If Not c.Comment Is Nothing Then
GetComment = GetComment & c.Comment.Text & ","
End If
Next
End Function

If this post helps click Yes
 
M

Mike H

Hi,

I don't see any errors that works fine. The only thing I can maybe see is
you have to enter

=GET.OBJECT(12,"comment 1")

in the refers to box

Mike
 
J

Justin Case

Hi,

I don't see any errors that works fine. The only thing I can maybe see is
you have to enter

=GET.OBJECT(12,"comment1")

in the refers to box

Mike








- Show quoted text -

I like both solutions, but unfortunately don't see a way using either
technique to automatically change the destination cell contents if the
target cell's comment changes.
Is there one?

Regards
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top