View Single Post
  #2   Report Post  
Norman Jones
 
Posts: n/a
Default

Hi Cheese,

The following macro inserts the text of each cell in rng1 into comments in
each cell in rng2. If the comments do not already exist, they are created.

Public Sub Tester03()
Dim rng1 As Range, rng2 As Range, rCell As Range
Dim sStr As String
Dim sh As Worksheet
Dim i As Long

Set sh = ActiveSheet '<<======= CHANGE
Set rng1 = sh.Range("A1:A20") '<<======= CHANGE
Set rng2 = rng1.Offset(0, 1) '<<======= CHANGE

For i = 1 To rng2.Cells.Count
sStr = rng1(i).Text
With rng2(i)
If .Comment Is Nothing Then .AddComment
.Comment.Text Text:=sStr
End With
Next

End Sub


---
Regards,
Norman



"Cheese" wrote in message
...
Is there a method to add a comment to a particular cell by using a
function
in another open cell?

I might write some comments in an adjacent empty cell (horizontally
speaking) because this is much faster than manually creating individual
comments. I would like to automatically apply those comments to another
range
of cells, but as comments to those cells. Any ideas?