ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How can I translate a comment to text in a cell? (https://www.excelbanter.com/excel-discussion-misc-queries/26302-how-can-i-translate-comment-text-cell.html)

DFIChris

How can I translate a comment to text in a cell?
 
A cell has existing text in it and it has a comment attached to it. I'd like
to append the comment to the end to the existing text in the cell.

Has anyone done this already? Is it possible without going into each and
every comment?

Thanks,
Chris

Jonathan Cooper

ASAP utilities has a UDF formula called "ASAPGetComment()". If you install
this utility (which I highly and impartially recomend), you could use this
formula to concatenate the two together.

http://www.asap-utilities.com

"DFIChris" wrote:

A cell has existing text in it and it has a comment attached to it. I'd like
to append the comment to the end to the existing text in the cell.

Has anyone done this already? Is it possible without going into each and
every comment?

Thanks,
Chris


Dave Peterson

You could use a little macro:

Option Explicit
Sub testme()
Dim myCommentCells As Range
Dim myCell As Range

Set myCommentCells = Nothing
On Error Resume Next
Set myCommentCells = Intersect(Selection, _
Selection.Cells.SpecialCells(xlCellTypeComments))
On Error GoTo 0

If myCommentCells Is Nothing Then
MsgBox "Please Select a range with comments and try again!"
Exit Sub
End If

For Each myCell In myCommentCells.Cells
With myCell
.Value = .Value & " " & .Comment.Text
End With
Next myCell

End Sub

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm


DFIChris wrote:

A cell has existing text in it and it has a comment attached to it. I'd like
to append the comment to the end to the existing text in the cell.

Has anyone done this already? Is it possible without going into each and
every comment?

Thanks,
Chris


--

Dave Peterson


All times are GMT +1. The time now is 07:28 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com