Notifications
Clear all

Função

3 Posts
1 Usuários
0 Reactions
718 Visualizações
(@fernandofernandes)
Posts: 43750
Illustrious Member
Topic starter
 

Ola pessoal. Como teen passado?
Por gentileza algum dos senhores conhece alguma função que me traga o comentário de uma ou mais célula de outra panilha?
Grato a todos.
PAYZZANNO.

 
Postado : 16/01/2013 2:38 pm
(@fernandofernandes)
Posts: 43750
Illustrious Member
Topic starter
 

Boa noite!!

Eu não entendi sua pergunta, mas creio que só por meio de VBA.
Talvez ao assim.

With Plan1.Cells(2, 3)
    .ClearComments 
    .AddComment Sheet2.Cells(5, 6).Comment.Text
End With

Att

 
Postado : 16/01/2013 5:47 pm
(@fernandofernandes)
Posts: 43750
Illustrious Member
Topic starter
 

Cole o código abaixo em um módulo, depois mande executar a macro, ela vai gerar uma nova planilha com as informações de todos os comentários de uma unica planilha.

Sub showcomments()
Application.ScreenUpdating = False

Dim commrange As Range
Dim mycell As Range
Dim curwks As Worksheet
Dim newwks As Worksheet
Dim i As Long

Set curwks = ActiveSheet

On Error Resume Next
Set commrange = curwks.Cells _
.SpecialCells(xlCellTypeComments)
On Error GoTo 0

If commrange Is Nothing Then
MsgBox "no comments found"
Exit Sub
End If

Set newwks = Worksheets.Add

newwks.Range("A1:D1").Value = _
Array("Address", "Name", "Value", "Comment")

i = 1
For Each mycell In commrange
With newwks
i = i + 1
On Error Resume Next
.Cells(i, 1).Value = mycell.Address
.Cells(i, 2).Value = mycell.Name.Name
.Cells(i, 3).Value = mycell.Value
.Cells(i, 4).Value = mycell.Comment.Text
End With
Next mycell

Application.ScreenUpdating = True

End Sub

[]Doni

 
Postado : 17/01/2013 1:05 pm