Moderatori: Anthony47, Flash30005
Sub SettaComm()
'
myArea = "F5:AJ32" '<< La tua area
'
For Each Cella In Range(myArea)
With Cella
.ClearComments
If Cella.Value <> 0 Then
.Select
.AddComment
.Comment.Visible = False
.Comment.Text Text:="Di turno:" & Chr(10) & Range("G70").Offset(Cella.Value - 1, 0).Value
End If
End With
Next Cella
End Sub
Comment.Text Text:="Di turno:" & Chr(10) & Range("G70").Offset(Cella.Value - 1, 0).Value
If IsNumeric(Cella.Value) And Cella.Value <> 0 Then
Sub mettinazioni()
ActiveSheet.Unprotect
Application.ScreenUpdating = False ' non vedo cambiare i vari fogli
myArea = "B4:B108" '<< La tua area
'
For Each Cella In Range(myArea)
With Cella
.ClearComments
If IsNumeric(Cella.Value) And Cella.Value <> 0 Then 'mette il nome solo nelle celle
.Select
.AddComment
.Comment.Visible = False
.Comment.Text Text:="nazione:" & Chr(10) & Range("FA4").Offset(Cella.Value - 1, 0).Value
End If
End With
Next Cella
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
Range("e1").Select
Application.ScreenUpdating = True
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
ActiveWindow.DisplayGridlines = False
End Sub
If IsNumeric(Cella.Value) And Cella.Value <> 0 Then
.Comment.Text Text:="nazione:" & Chr(10) & Range("FA4").Offset(Cella.Value - 1, 0).Value
....Range("FA4").Offset(Cella.Value - 1, 0).Value
For Each Cella In Range(myArea)
With Cella
.ClearComments
' If IsNumeric(Cella.Value) And Cella.Value <> 0 Then 'mette il nome solo nelle celle con i numeri <<< salta con apice
.Select
.AddComment
.Comment.Visible = False
.Comment.Text Text:="nazione:" & Chr(10) & Range("FA4").Offset(Cella.Value - 1, 0).Value
'End If
End With
Next Cella
.Comment.Text Text:="nazione:" & Chr(10) & Range("FA4").Value
.Comment.Text Text:="nazione:" & Chr(10) & Cells(Cella.row, "FA").Value
Sub mettinazioni()
ActiveSheet.Unprotect
Application.ScreenUpdating = False ' non vedo cambiare i vari fogli
myArea = "B4:B108" '<< La tua area
For Each Cella In Range(myArea)
With Cella
.ClearComments
If Cella.Value <> "" Then 'mette il nome solo nelle celle piene
.Select
.AddComment
.Comment.Visible = False
.Comment.Text Text:="nazione:" & Chr(10) & Cells(Cella.Row, "FA").Value
End If
End With
Next Cella
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
Range("e1").Select
Application.ScreenUpdating = True
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
ActiveWindow.DisplayGridlines = False
End Sub
Torna a Applicazioni Office Windows
Aggiornamento automatico intervallo grafici Autore: wallace&gromit |
Forum: Applicazioni Office Windows Risposte: 3 |
Inserire commento su cella attiva con macro Autore: lone wolf |
Forum: Applicazioni Office Windows Risposte: 35 |
Visitano il forum: Nessuno e 14 ospiti