Joe Was
MrExcel MVP
- Joined
- Feb 19, 2002
- Messages
- 7,539
This is a custom function:
Function CommentText(rCellWithComment As Range)
CommentText = WorksheetFunction.Clean(rCellWithComment.Comment.Text)
End Function
It gos in a module.
To use it you must:
use a syntax of, " =CommentText(A1)"
Subsitute the cell address you want the comment of returned for like the "A1" in the above syntax.
If the cell has no comment none will be returned!
In the source comment cell you must have a comment. That cell will have a red upper right corner which triggers the comment for that cell. In the calling cell put the function call and it will display the comment of the source cell as a text line in or extending to the right of the calling cell. Hope this helps. JSW
Function CommentText(rCellWithComment As Range)
CommentText = WorksheetFunction.Clean(rCellWithComment.Comment.Text)
End Function
It gos in a module.
To use it you must:
use a syntax of, " =CommentText(A1)"
Subsitute the cell address you want the comment of returned for like the "A1" in the above syntax.
If the cell has no comment none will be returned!
In the source comment cell you must have a comment. That cell will have a red upper right corner which triggers the comment for that cell. In the calling cell put the function call and it will display the comment of the source cell as a text line in or extending to the right of the calling cell. Hope this helps. JSW