Referencing comments

  • Thread starter Thread starter Steve Wylie
  • Start date Start date
S

Steve Wylie

Is it possible for me to get a cell to contain the
comment of a different cell, referenced so that if the
comment in the referenced cell is changed, then the text
of that comment being displayed in the referencing cell
will change also?

Yes, I had to read that last sentence again as well..!
What I mean is, if I had a quantity in cell B4, with a
comment in that cell, could I have the text of that
comment display in cell J12 (visible text so I didn't
have to click on the cell to get it to display like I
have to do with comments), and if I then changed the
comment in cell B4, to have the text in cell J12 to
change automatically? I have looked at possible
formulae but cannot find anything to display the comment
value of a cell.

Steve Wylie
 
Hi
there's no build-in function for this. you could create a
user defined function for getting the comment value from a
cell. Though this won't change automatically if you change
the comment. You needa re-calculation for this..
But try the following user defined function:

Public Function get_comment(rng As Range)
get_comment = rng.Comment.Text
End Function

Use it in your worksheet like
=GET_COMMENT(B4)
This will return #VALUE if no comment exist
 
Thanks very much, that's just the sort of thing I was
looking for. I'm sure I can work with the user defined
function you outlined.

Steve
 
Back
Top