Bonjour,
Dans le module feuille de ton classeur, copie ce qui suit :
Dans la procédure : Ces plages sont adaptées au besoin
En A1 = montant global
En A2:A12 Montant partiel
'------------------------------------
Private Sub Worksheet_Change(ByVal Target As Range)
Dim Rg As Range
Set Rg = Range("A2:A12")
If Target.Address = Range("A1").Address Then
If IsNumeric(Range("a1")) Then
If Range("A1") <> 0 Then
LesCommentaires Rg
End If
End If
End If
Set Rg = Intersect(Target, Range("A2:A12"))
If Not Rg Is Nothing Then
LesCommentaires Rg
End If
Set Rg = Nothing
End Sub
'------------------------------------
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Intersect(Target, Range("A2:A12")) Is Nothing Then
If Target.Cells.Count > 1 Then Exit Sub
Target.ClearComments
If IsNumeric(Range("A1")) And IsNumeric(Target) Then
If Range("A1") <> 0 And Target.Value <> 0 Then
Text = "Pourcentage : " & Format(Target.Value / Range("A1"),
"percent")
Target.AddComment Text
End If
End If
End If
End Sub
'------------------------------------
Sub LesCommentaires(Rg As Range)
For Each c In Rg
c.ClearComments
If IsNumeric(c) Then
If c <> 0 Then
Text = "Pourcentage : " _
& Format(c.Value / Range("A1"), "percent")
c.AddComment Text
End If
End If
Next
End Sub
'------------------------------------
a écrit dans le message de
news:14c1f01c3fa01$0e0d74a0$
bonjour, je cherche à faire apparaitre l'interprétation
du résultat d'une cellule sur son commentaire.
par exemple :
sur la cellule a1 montant du budget total fixe
sur a2 montant budget janvier évolutif
sur a3 montant budget fevrier évolutif
.. etc
je veux voir en sélectionnant les cellules a2 puis
a3, ..etc l'évolution du pourcentage du budget du mois
sélectionné par rapport au budget total.
est-ce possible?
Bonjour,
Dans le module feuille de ton classeur, copie ce qui suit :
Dans la procédure : Ces plages sont adaptées au besoin
En A1 = montant global
En A2:A12 Montant partiel
'------------------------------------
Private Sub Worksheet_Change(ByVal Target As Range)
Dim Rg As Range
Set Rg = Range("A2:A12")
If Target.Address = Range("A1").Address Then
If IsNumeric(Range("a1")) Then
If Range("A1") <> 0 Then
LesCommentaires Rg
End If
End If
End If
Set Rg = Intersect(Target, Range("A2:A12"))
If Not Rg Is Nothing Then
LesCommentaires Rg
End If
Set Rg = Nothing
End Sub
'------------------------------------
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Intersect(Target, Range("A2:A12")) Is Nothing Then
If Target.Cells.Count > 1 Then Exit Sub
Target.ClearComments
If IsNumeric(Range("A1")) And IsNumeric(Target) Then
If Range("A1") <> 0 And Target.Value <> 0 Then
Text = "Pourcentage : " & Format(Target.Value / Range("A1"),
"percent")
Target.AddComment Text
End If
End If
End If
End Sub
'------------------------------------
Sub LesCommentaires(Rg As Range)
For Each c In Rg
c.ClearComments
If IsNumeric(c) Then
If c <> 0 Then
Text = "Pourcentage : " _
& Format(c.Value / Range("A1"), "percent")
c.AddComment Text
End If
End If
Next
End Sub
'------------------------------------
<anonymous@discussions.microsoft.com> a écrit dans le message de
news:14c1f01c3fa01$0e0d74a0$a001280a@phx.gbl...
bonjour, je cherche à faire apparaitre l'interprétation
du résultat d'une cellule sur son commentaire.
par exemple :
sur la cellule a1 montant du budget total fixe
sur a2 montant budget janvier évolutif
sur a3 montant budget fevrier évolutif
.. etc
je veux voir en sélectionnant les cellules a2 puis
a3, ..etc l'évolution du pourcentage du budget du mois
sélectionné par rapport au budget total.
est-ce possible?
Bonjour,
Dans le module feuille de ton classeur, copie ce qui suit :
Dans la procédure : Ces plages sont adaptées au besoin
En A1 = montant global
En A2:A12 Montant partiel
'------------------------------------
Private Sub Worksheet_Change(ByVal Target As Range)
Dim Rg As Range
Set Rg = Range("A2:A12")
If Target.Address = Range("A1").Address Then
If IsNumeric(Range("a1")) Then
If Range("A1") <> 0 Then
LesCommentaires Rg
End If
End If
End If
Set Rg = Intersect(Target, Range("A2:A12"))
If Not Rg Is Nothing Then
LesCommentaires Rg
End If
Set Rg = Nothing
End Sub
'------------------------------------
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Intersect(Target, Range("A2:A12")) Is Nothing Then
If Target.Cells.Count > 1 Then Exit Sub
Target.ClearComments
If IsNumeric(Range("A1")) And IsNumeric(Target) Then
If Range("A1") <> 0 And Target.Value <> 0 Then
Text = "Pourcentage : " & Format(Target.Value / Range("A1"),
"percent")
Target.AddComment Text
End If
End If
End If
End Sub
'------------------------------------
Sub LesCommentaires(Rg As Range)
For Each c In Rg
c.ClearComments
If IsNumeric(c) Then
If c <> 0 Then
Text = "Pourcentage : " _
& Format(c.Value / Range("A1"), "percent")
c.AddComment Text
End If
End If
Next
End Sub
'------------------------------------
a écrit dans le message de
news:14c1f01c3fa01$0e0d74a0$
bonjour, je cherche à faire apparaitre l'interprétation
du résultat d'une cellule sur son commentaire.
par exemple :
sur la cellule a1 montant du budget total fixe
sur a2 montant budget janvier évolutif
sur a3 montant budget fevrier évolutif
.. etc
je veux voir en sélectionnant les cellules a2 puis
a3, ..etc l'évolution du pourcentage du budget du mois
sélectionné par rapport au budget total.
est-ce possible?
Bonjour,
Dans le module feuille de ton classeur, copie ce qui suit :
Dans la procédure : Ces plages sont adaptées au besoin
En A1 = montant global
En A2:A12 Montant partiel
'------------------------------------
Private Sub Worksheet_Change(ByVal Target As Range)
Dim Rg As Range
Set Rg = Range("A2:A12")
If Target.Address = Range("A1").Address Then
If IsNumeric(Range("a1")) Then
If Range("A1") <> 0 Then
LesCommentaires Rg
End If
End If
End If
Set Rg = Intersect(Target, Range("A2:A12"))
If Not Rg Is Nothing Then
LesCommentaires Rg
End If
Set Rg = Nothing
End Sub
'------------------------------------
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Intersect(Target, Range("A2:A12")) Is Nothing Then
If Target.Cells.Count > 1 Then Exit Sub
Target.ClearComments
If IsNumeric(Range("A1")) And IsNumeric(Target) Then
If Range("A1") <> 0 And Target.Value <> 0 Then
Text = "Pourcentage : " & Format(Target.Value / Range("A1"),
"percent")
Target.AddComment Text
End If
End If
End If
End Sub
'------------------------------------
Sub LesCommentaires(Rg As Range)
For Each c In Rg
c.ClearComments
If IsNumeric(c) Then
If c <> 0 Then
Text = "Pourcentage : " _
& Format(c.Value / Range("A1"), "percent")
c.AddComment Text
End If
End If
Next
End Sub
'------------------------------------
a écrit dans le message de
news:14c1f01c3fa01$0e0d74a0$
bonjour, je cherche à faire apparaitre l'interprétation
du résultat d'une cellule sur son commentaire.
par exemple :
sur la cellule a1 montant du budget total fixe
sur a2 montant budget janvier évolutif
sur a3 montant budget fevrier évolutif
.. etc
je veux voir en sélectionnant les cellules a2 puis
a3, ..etc l'évolution du pourcentage du budget du mois
sélectionné par rapport au budget total.
est-ce possible?
Bonjour,
Dans le module feuille de ton classeur, copie ce qui suit :
Dans la procédure : Ces plages sont adaptées au besoin
En A1 = montant global
En A2:A12 Montant partiel
'------------------------------------
Private Sub Worksheet_Change(ByVal Target As Range)
Dim Rg As Range
Set Rg = Range("A2:A12")
If Target.Address = Range("A1").Address Then
If IsNumeric(Range("a1")) Then
If Range("A1") <> 0 Then
LesCommentaires Rg
End If
End If
End If
Set Rg = Intersect(Target, Range("A2:A12"))
If Not Rg Is Nothing Then
LesCommentaires Rg
End If
Set Rg = Nothing
End Sub
'------------------------------------
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Intersect(Target, Range("A2:A12")) Is Nothing Then
If Target.Cells.Count > 1 Then Exit Sub
Target.ClearComments
If IsNumeric(Range("A1")) And IsNumeric(Target) Then
If Range("A1") <> 0 And Target.Value <> 0 Then
Text = "Pourcentage : " & Format(Target.Value / Range("A1"),
"percent")
Target.AddComment Text
End If
End If
End If
End Sub
'------------------------------------
Sub LesCommentaires(Rg As Range)
For Each c In Rg
c.ClearComments
If IsNumeric(c) Then
If c <> 0 Then
Text = "Pourcentage : " _
& Format(c.Value / Range("A1"), "percent")
c.AddComment Text
End If
End If
Next
End Sub
'------------------------------------
<anonymous@discussions.microsoft.com> a écrit dans le message de
news:14c1f01c3fa01$0e0d74a0$a001280a@phx.gbl...
bonjour, je cherche à faire apparaitre l'interprétation
du résultat d'une cellule sur son commentaire.
par exemple :
sur la cellule a1 montant du budget total fixe
sur a2 montant budget janvier évolutif
sur a3 montant budget fevrier évolutif
.. etc
je veux voir en sélectionnant les cellules a2 puis
a3, ..etc l'évolution du pourcentage du budget du mois
sélectionné par rapport au budget total.
est-ce possible?
Bonjour,
Dans le module feuille de ton classeur, copie ce qui suit :
Dans la procédure : Ces plages sont adaptées au besoin
En A1 = montant global
En A2:A12 Montant partiel
'------------------------------------
Private Sub Worksheet_Change(ByVal Target As Range)
Dim Rg As Range
Set Rg = Range("A2:A12")
If Target.Address = Range("A1").Address Then
If IsNumeric(Range("a1")) Then
If Range("A1") <> 0 Then
LesCommentaires Rg
End If
End If
End If
Set Rg = Intersect(Target, Range("A2:A12"))
If Not Rg Is Nothing Then
LesCommentaires Rg
End If
Set Rg = Nothing
End Sub
'------------------------------------
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Intersect(Target, Range("A2:A12")) Is Nothing Then
If Target.Cells.Count > 1 Then Exit Sub
Target.ClearComments
If IsNumeric(Range("A1")) And IsNumeric(Target) Then
If Range("A1") <> 0 And Target.Value <> 0 Then
Text = "Pourcentage : " & Format(Target.Value / Range("A1"),
"percent")
Target.AddComment Text
End If
End If
End If
End Sub
'------------------------------------
Sub LesCommentaires(Rg As Range)
For Each c In Rg
c.ClearComments
If IsNumeric(c) Then
If c <> 0 Then
Text = "Pourcentage : " _
& Format(c.Value / Range("A1"), "percent")
c.AddComment Text
End If
End If
Next
End Sub
'------------------------------------
a écrit dans le message de
news:14c1f01c3fa01$0e0d74a0$
bonjour, je cherche à faire apparaitre l'interprétation
du résultat d'une cellule sur son commentaire.
par exemple :
sur la cellule a1 montant du budget total fixe
sur a2 montant budget janvier évolutif
sur a3 montant budget fevrier évolutif
.. etc
je veux voir en sélectionnant les cellules a2 puis
a3, ..etc l'évolution du pourcentage du budget du mois
sélectionné par rapport au budget total.
est-ce possible?
Bonjour Garnote,
Le seul "hic" c'est que l'on doive réellement sélectionner la cellule pour
visualiser le commentaire ! M'enfin !!!
Salutations!
"garnote" a écrit dans le message de
news:jIn_b.74450$
Salut Denis,
J'ai un peu changé de fil !
Tes «publications» m'ont permis de «fioriturer» ma patente :
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Column <> 1 Then
Range("A:A").ClearComments
Else
If Target.Column = 1 And Target.Row <> 1 Then Commentaires_Évolutifs
End If
End Sub
Sub Commentaires_Évolutifs()
On Error Resume Next
Range("A:A").ClearComments
Set ici = ActiveCell
If ici = "" Or Not IsNumeric(ici) Then Exit Sub
t = Format(ici.Value / [a1], "percent")
With ici
.ClearComments
.AddComment
.Comment.Text Text:="Évolution: " & t
.Comment.Visible = True
.Comment.Shape.OLEFormat.Object.AutoSize = True
End With
End Sub
Serge
"michdenis" a écrit dans le message de news:
uf2r1Hh#Bonjour,
Dans le module feuille de ton classeur, copie ce qui suit :
Dans la procédure : Ces plages sont adaptées au besoin
En A1 = montant global
En A2:A12 Montant partiel
'------------------------------------
Private Sub Worksheet_Change(ByVal Target As Range)
Dim Rg As Range
Set Rg = Range("A2:A12")
If Target.Address = Range("A1").Address Then
If IsNumeric(Range("a1")) Then
If Range("A1") <> 0 Then
LesCommentaires Rg
End If
End If
End If
Set Rg = Intersect(Target, Range("A2:A12"))
If Not Rg Is Nothing Then
LesCommentaires Rg
End If
Set Rg = Nothing
End Sub
'------------------------------------
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Intersect(Target, Range("A2:A12")) Is Nothing Then
If Target.Cells.Count > 1 Then Exit Sub
Target.ClearComments
If IsNumeric(Range("A1")) And IsNumeric(Target) Then
If Range("A1") <> 0 And Target.Value <> 0 Then
Text = "Pourcentage : " & Format(Target.Value / Range("A1"),
"percent")Target.AddComment Text
End If
End If
End If
End Sub
'------------------------------------
Sub LesCommentaires(Rg As Range)
For Each c In Rg
c.ClearComments
If IsNumeric(c) Then
If c <> 0 Then
Text = "Pourcentage : " _
& Format(c.Value / Range("A1"), "percent")
c.AddComment Text
End If
End If
Next
End Sub
'------------------------------------
a écrit dans le message de
news:14c1f01c3fa01$0e0d74a0$bonjour, je cherche à faire apparaitre l'interprétation
du résultat d'une cellule sur son commentaire.
par exemple :
sur la cellule a1 montant du budget total fixe
sur a2 montant budget janvier évolutif
sur a3 montant budget fevrier évolutif
.. etc
je veux voir en sélectionnant les cellules a2 puis
a3, ..etc l'évolution du pourcentage du budget du mois
sélectionné par rapport au budget total.
est-ce possible?
Bonjour Garnote,
Le seul "hic" c'est que l'on doive réellement sélectionner la cellule pour
visualiser le commentaire ! M'enfin !!!
Salutations!
"garnote" <rien@absent.net> a écrit dans le message de
news:jIn_b.74450$2g.25943@charlie.risq.qc.ca...
Salut Denis,
J'ai un peu changé de fil !
Tes «publications» m'ont permis de «fioriturer» ma patente :
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Column <> 1 Then
Range("A:A").ClearComments
Else
If Target.Column = 1 And Target.Row <> 1 Then Commentaires_Évolutifs
End If
End Sub
Sub Commentaires_Évolutifs()
On Error Resume Next
Range("A:A").ClearComments
Set ici = ActiveCell
If ici = "" Or Not IsNumeric(ici) Then Exit Sub
t = Format(ici.Value / [a1], "percent")
With ici
.ClearComments
.AddComment
.Comment.Text Text:="Évolution: " & t
.Comment.Visible = True
.Comment.Shape.OLEFormat.Object.AutoSize = True
End With
End Sub
Serge
"michdenis" <michdenis@hotmail.com> a écrit dans le message de news:
uf2r1Hh#DHA.2348@TK2MSFTNGP09.phx.gbl...
Bonjour,
Dans le module feuille de ton classeur, copie ce qui suit :
Dans la procédure : Ces plages sont adaptées au besoin
En A1 = montant global
En A2:A12 Montant partiel
'------------------------------------
Private Sub Worksheet_Change(ByVal Target As Range)
Dim Rg As Range
Set Rg = Range("A2:A12")
If Target.Address = Range("A1").Address Then
If IsNumeric(Range("a1")) Then
If Range("A1") <> 0 Then
LesCommentaires Rg
End If
End If
End If
Set Rg = Intersect(Target, Range("A2:A12"))
If Not Rg Is Nothing Then
LesCommentaires Rg
End If
Set Rg = Nothing
End Sub
'------------------------------------
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Intersect(Target, Range("A2:A12")) Is Nothing Then
If Target.Cells.Count > 1 Then Exit Sub
Target.ClearComments
If IsNumeric(Range("A1")) And IsNumeric(Target) Then
If Range("A1") <> 0 And Target.Value <> 0 Then
Text = "Pourcentage : " & Format(Target.Value / Range("A1"),
"percent")
Target.AddComment Text
End If
End If
End If
End Sub
'------------------------------------
Sub LesCommentaires(Rg As Range)
For Each c In Rg
c.ClearComments
If IsNumeric(c) Then
If c <> 0 Then
Text = "Pourcentage : " _
& Format(c.Value / Range("A1"), "percent")
c.AddComment Text
End If
End If
Next
End Sub
'------------------------------------
<anonymous@discussions.microsoft.com> a écrit dans le message de
news:14c1f01c3fa01$0e0d74a0$a001280a@phx.gbl...
bonjour, je cherche à faire apparaitre l'interprétation
du résultat d'une cellule sur son commentaire.
par exemple :
sur la cellule a1 montant du budget total fixe
sur a2 montant budget janvier évolutif
sur a3 montant budget fevrier évolutif
.. etc
je veux voir en sélectionnant les cellules a2 puis
a3, ..etc l'évolution du pourcentage du budget du mois
sélectionné par rapport au budget total.
est-ce possible?
Bonjour Garnote,
Le seul "hic" c'est que l'on doive réellement sélectionner la cellule pour
visualiser le commentaire ! M'enfin !!!
Salutations!
"garnote" a écrit dans le message de
news:jIn_b.74450$
Salut Denis,
J'ai un peu changé de fil !
Tes «publications» m'ont permis de «fioriturer» ma patente :
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Column <> 1 Then
Range("A:A").ClearComments
Else
If Target.Column = 1 And Target.Row <> 1 Then Commentaires_Évolutifs
End If
End Sub
Sub Commentaires_Évolutifs()
On Error Resume Next
Range("A:A").ClearComments
Set ici = ActiveCell
If ici = "" Or Not IsNumeric(ici) Then Exit Sub
t = Format(ici.Value / [a1], "percent")
With ici
.ClearComments
.AddComment
.Comment.Text Text:="Évolution: " & t
.Comment.Visible = True
.Comment.Shape.OLEFormat.Object.AutoSize = True
End With
End Sub
Serge
"michdenis" a écrit dans le message de news:
uf2r1Hh#Bonjour,
Dans le module feuille de ton classeur, copie ce qui suit :
Dans la procédure : Ces plages sont adaptées au besoin
En A1 = montant global
En A2:A12 Montant partiel
'------------------------------------
Private Sub Worksheet_Change(ByVal Target As Range)
Dim Rg As Range
Set Rg = Range("A2:A12")
If Target.Address = Range("A1").Address Then
If IsNumeric(Range("a1")) Then
If Range("A1") <> 0 Then
LesCommentaires Rg
End If
End If
End If
Set Rg = Intersect(Target, Range("A2:A12"))
If Not Rg Is Nothing Then
LesCommentaires Rg
End If
Set Rg = Nothing
End Sub
'------------------------------------
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Intersect(Target, Range("A2:A12")) Is Nothing Then
If Target.Cells.Count > 1 Then Exit Sub
Target.ClearComments
If IsNumeric(Range("A1")) And IsNumeric(Target) Then
If Range("A1") <> 0 And Target.Value <> 0 Then
Text = "Pourcentage : " & Format(Target.Value / Range("A1"),
"percent")Target.AddComment Text
End If
End If
End If
End Sub
'------------------------------------
Sub LesCommentaires(Rg As Range)
For Each c In Rg
c.ClearComments
If IsNumeric(c) Then
If c <> 0 Then
Text = "Pourcentage : " _
& Format(c.Value / Range("A1"), "percent")
c.AddComment Text
End If
End If
Next
End Sub
'------------------------------------
a écrit dans le message de
news:14c1f01c3fa01$0e0d74a0$bonjour, je cherche à faire apparaitre l'interprétation
du résultat d'une cellule sur son commentaire.
par exemple :
sur la cellule a1 montant du budget total fixe
sur a2 montant budget janvier évolutif
sur a3 montant budget fevrier évolutif
.. etc
je veux voir en sélectionnant les cellules a2 puis
a3, ..etc l'évolution du pourcentage du budget du mois
sélectionné par rapport au budget total.
est-ce possible?
Bonjour Garnote,
Le seul "hic" c'est que l'on doive réellement sélectionner la cellule pour
visualiser le commentaire ! M'enfin !!!
Salutations!
"garnote" a écrit dans le message de
news:jIn_b.74450$
Salut Denis,
J'ai un peu changé de fil !
Tes «publications» m'ont permis de «fioriturer» ma patente :
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Column <> 1 Then
Range("A:A").ClearComments
Else
If Target.Column = 1 And Target.Row <> 1 Then Commentaires_Évolutifs
End If
End Sub
Sub Commentaires_Évolutifs()
On Error Resume Next
Range("A:A").ClearComments
Set ici = ActiveCell
If ici = "" Or Not IsNumeric(ici) Then Exit Sub
t = Format(ici.Value / [a1], "percent")
With ici
.ClearComments
.AddComment
.Comment.Text Text:="Évolution: " & t
.Comment.Visible = True
.Comment.Shape.OLEFormat.Object.AutoSize = True
End With
End Sub
Serge
"michdenis" a écrit dans le message de news:
uf2r1Hh#Bonjour,
Dans le module feuille de ton classeur, copie ce qui suit :
Dans la procédure : Ces plages sont adaptées au besoin
En A1 = montant global
En A2:A12 Montant partiel
'------------------------------------
Private Sub Worksheet_Change(ByVal Target As Range)
Dim Rg As Range
Set Rg = Range("A2:A12")
If Target.Address = Range("A1").Address Then
If IsNumeric(Range("a1")) Then
If Range("A1") <> 0 Then
LesCommentaires Rg
End If
End If
End If
Set Rg = Intersect(Target, Range("A2:A12"))
If Not Rg Is Nothing Then
LesCommentaires Rg
End If
Set Rg = Nothing
End Sub
'------------------------------------
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Intersect(Target, Range("A2:A12")) Is Nothing Then
If Target.Cells.Count > 1 Then Exit Sub
Target.ClearComments
If IsNumeric(Range("A1")) And IsNumeric(Target) Then
If Range("A1") <> 0 And Target.Value <> 0 Then
Text = "Pourcentage : " & Format(Target.Value / Range("A1"),
"percent")Target.AddComment Text
End If
End If
End If
End Sub
'------------------------------------
Sub LesCommentaires(Rg As Range)
For Each c In Rg
c.ClearComments
If IsNumeric(c) Then
If c <> 0 Then
Text = "Pourcentage : " _
& Format(c.Value / Range("A1"), "percent")
c.AddComment Text
End If
End If
Next
End Sub
'------------------------------------
a écrit dans le message de
news:14c1f01c3fa01$0e0d74a0$bonjour, je cherche à faire apparaitre l'interprétation
du résultat d'une cellule sur son commentaire.
par exemple :
sur la cellule a1 montant du budget total fixe
sur a2 montant budget janvier évolutif
sur a3 montant budget fevrier évolutif
.. etc
je veux voir en sélectionnant les cellules a2 puis
a3, ..etc l'évolution du pourcentage du budget du mois
sélectionné par rapport au budget total.
est-ce possible?
Bonjour Garnote,
Le seul "hic" c'est que l'on doive réellement sélectionner la cellule pour
visualiser le commentaire ! M'enfin !!!
Salutations!
"garnote" <rien@absent.net> a écrit dans le message de
news:jIn_b.74450$2g.25943@charlie.risq.qc.ca...
Salut Denis,
J'ai un peu changé de fil !
Tes «publications» m'ont permis de «fioriturer» ma patente :
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Column <> 1 Then
Range("A:A").ClearComments
Else
If Target.Column = 1 And Target.Row <> 1 Then Commentaires_Évolutifs
End If
End Sub
Sub Commentaires_Évolutifs()
On Error Resume Next
Range("A:A").ClearComments
Set ici = ActiveCell
If ici = "" Or Not IsNumeric(ici) Then Exit Sub
t = Format(ici.Value / [a1], "percent")
With ici
.ClearComments
.AddComment
.Comment.Text Text:="Évolution: " & t
.Comment.Visible = True
.Comment.Shape.OLEFormat.Object.AutoSize = True
End With
End Sub
Serge
"michdenis" <michdenis@hotmail.com> a écrit dans le message de news:
uf2r1Hh#DHA.2348@TK2MSFTNGP09.phx.gbl...
Bonjour,
Dans le module feuille de ton classeur, copie ce qui suit :
Dans la procédure : Ces plages sont adaptées au besoin
En A1 = montant global
En A2:A12 Montant partiel
'------------------------------------
Private Sub Worksheet_Change(ByVal Target As Range)
Dim Rg As Range
Set Rg = Range("A2:A12")
If Target.Address = Range("A1").Address Then
If IsNumeric(Range("a1")) Then
If Range("A1") <> 0 Then
LesCommentaires Rg
End If
End If
End If
Set Rg = Intersect(Target, Range("A2:A12"))
If Not Rg Is Nothing Then
LesCommentaires Rg
End If
Set Rg = Nothing
End Sub
'------------------------------------
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Intersect(Target, Range("A2:A12")) Is Nothing Then
If Target.Cells.Count > 1 Then Exit Sub
Target.ClearComments
If IsNumeric(Range("A1")) And IsNumeric(Target) Then
If Range("A1") <> 0 And Target.Value <> 0 Then
Text = "Pourcentage : " & Format(Target.Value / Range("A1"),
"percent")
Target.AddComment Text
End If
End If
End If
End Sub
'------------------------------------
Sub LesCommentaires(Rg As Range)
For Each c In Rg
c.ClearComments
If IsNumeric(c) Then
If c <> 0 Then
Text = "Pourcentage : " _
& Format(c.Value / Range("A1"), "percent")
c.AddComment Text
End If
End If
Next
End Sub
'------------------------------------
<anonymous@discussions.microsoft.com> a écrit dans le message de
news:14c1f01c3fa01$0e0d74a0$a001280a@phx.gbl...
bonjour, je cherche à faire apparaitre l'interprétation
du résultat d'une cellule sur son commentaire.
par exemple :
sur la cellule a1 montant du budget total fixe
sur a2 montant budget janvier évolutif
sur a3 montant budget fevrier évolutif
.. etc
je veux voir en sélectionnant les cellules a2 puis
a3, ..etc l'évolution du pourcentage du budget du mois
sélectionné par rapport au budget total.
est-ce possible?
Bonjour Garnote,
Le seul "hic" c'est que l'on doive réellement sélectionner la cellule pour
visualiser le commentaire ! M'enfin !!!
Salutations!
"garnote" a écrit dans le message de
news:jIn_b.74450$
Salut Denis,
J'ai un peu changé de fil !
Tes «publications» m'ont permis de «fioriturer» ma patente :
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Column <> 1 Then
Range("A:A").ClearComments
Else
If Target.Column = 1 And Target.Row <> 1 Then Commentaires_Évolutifs
End If
End Sub
Sub Commentaires_Évolutifs()
On Error Resume Next
Range("A:A").ClearComments
Set ici = ActiveCell
If ici = "" Or Not IsNumeric(ici) Then Exit Sub
t = Format(ici.Value / [a1], "percent")
With ici
.ClearComments
.AddComment
.Comment.Text Text:="Évolution: " & t
.Comment.Visible = True
.Comment.Shape.OLEFormat.Object.AutoSize = True
End With
End Sub
Serge
"michdenis" a écrit dans le message de news:
uf2r1Hh#Bonjour,
Dans le module feuille de ton classeur, copie ce qui suit :
Dans la procédure : Ces plages sont adaptées au besoin
En A1 = montant global
En A2:A12 Montant partiel
'------------------------------------
Private Sub Worksheet_Change(ByVal Target As Range)
Dim Rg As Range
Set Rg = Range("A2:A12")
If Target.Address = Range("A1").Address Then
If IsNumeric(Range("a1")) Then
If Range("A1") <> 0 Then
LesCommentaires Rg
End If
End If
End If
Set Rg = Intersect(Target, Range("A2:A12"))
If Not Rg Is Nothing Then
LesCommentaires Rg
End If
Set Rg = Nothing
End Sub
'------------------------------------
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Intersect(Target, Range("A2:A12")) Is Nothing Then
If Target.Cells.Count > 1 Then Exit Sub
Target.ClearComments
If IsNumeric(Range("A1")) And IsNumeric(Target) Then
If Range("A1") <> 0 And Target.Value <> 0 Then
Text = "Pourcentage : " & Format(Target.Value / Range("A1"),
"percent")Target.AddComment Text
End If
End If
End If
End Sub
'------------------------------------
Sub LesCommentaires(Rg As Range)
For Each c In Rg
c.ClearComments
If IsNumeric(c) Then
If c <> 0 Then
Text = "Pourcentage : " _
& Format(c.Value / Range("A1"), "percent")
c.AddComment Text
End If
End If
Next
End Sub
'------------------------------------
a écrit dans le message de
news:14c1f01c3fa01$0e0d74a0$bonjour, je cherche à faire apparaitre l'interprétation
du résultat d'une cellule sur son commentaire.
par exemple :
sur la cellule a1 montant du budget total fixe
sur a2 montant budget janvier évolutif
sur a3 montant budget fevrier évolutif
.. etc
je veux voir en sélectionnant les cellules a2 puis
a3, ..etc l'évolution du pourcentage du budget du mois
sélectionné par rapport au budget total.
est-ce possible?
"C'est effectivement du plus bel effet si on les laisse affichés"
Tu n'as jamais si bien dit.... ils demeurent tous affichés ! WoW !
;-)
Salutations!
"garnote" a écrit dans le message de
news:B7o_b.74455$
C'est effectivement du plus bel effet si on les laisse affichés
et ça simplifie mes macros.
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Column = 1 And Target.Row <> 1 Then Commentaires_Évolutifs
End Sub
Sub Commentaires_Évolutifs()
On Error Resume Next
Set ici = ActiveCell
If ici = "" Or Not IsNumeric(ici) Then
ici.ClearComments
Exit Sub
End If
t = Format(ici.Value / [a1], "percent")
With ici
.ClearComments
.AddComment
.Comment.Text Text:="Évolution: " & t
.Comment.Visible = True
.Comment.Shape.TextFrame.AutoSize = True
End With
End Sub
:-)
Serge
"michdenis" a écrit dans le message de news:
eEpWHeh#Bonjour Garnote,
Le seul "hic" c'est que l'on doive réellement sélectionner la cellule
pour
visualiser le commentaire ! M'enfin !!!
Salutations!
"garnote" a écrit dans le message de
news:jIn_b.74450$Salut Denis,
J'ai un peu changé de fil !
Tes «publications» m'ont permis de «fioriturer» ma patente :
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Column <> 1 Then
Range("A:A").ClearComments
Else
If Target.Column = 1 And Target.Row <> 1 Then Commentaires_Évolutifs
End If
End Sub
Sub Commentaires_Évolutifs()
On Error Resume Next
Range("A:A").ClearComments
Set ici = ActiveCell
If ici = "" Or Not IsNumeric(ici) Then Exit Sub
t = Format(ici.Value / [a1], "percent")
With ici
.ClearComments
.AddComment
.Comment.Text Text:="Évolution: " & t
.Comment.Visible = True
.Comment.Shape.OLEFormat.Object.AutoSize = True
End With
End Sub
Serge
"michdenis" a écrit dans le message de news:
uf2r1Hh#Bonjour,
Dans le module feuille de ton classeur, copie ce qui suit :
Dans la procédure : Ces plages sont adaptées au besoin
En A1 = montant global
En A2:A12 Montant partiel
'------------------------------------
Private Sub Worksheet_Change(ByVal Target As Range)
Dim Rg As Range
Set Rg = Range("A2:A12")
If Target.Address = Range("A1").Address Then
If IsNumeric(Range("a1")) Then
If Range("A1") <> 0 Then
LesCommentaires Rg
End If
End If
End If
Set Rg = Intersect(Target, Range("A2:A12"))
If Not Rg Is Nothing Then
LesCommentaires Rg
End If
Set Rg = Nothing
End Sub
'------------------------------------
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Intersect(Target, Range("A2:A12")) Is Nothing Then
If Target.Cells.Count > 1 Then Exit Sub
Target.ClearComments
If IsNumeric(Range("A1")) And IsNumeric(Target) Then
If Range("A1") <> 0 And Target.Value <> 0 Then
Text = "Pourcentage : " & Format(Target.Value /
Range("A1"),
"percent")Target.AddComment Text
End If
End If
End If
End Sub
'------------------------------------
Sub LesCommentaires(Rg As Range)
For Each c In Rg
c.ClearComments
If IsNumeric(c) Then
If c <> 0 Then
Text = "Pourcentage : " _
& Format(c.Value / Range("A1"), "percent")
c.AddComment Text
End If
End If
Next
End Sub
'------------------------------------
a écrit dans le message de
news:14c1f01c3fa01$0e0d74a0$bonjour, je cherche à faire apparaitre l'interprétation
du résultat d'une cellule sur son commentaire.
par exemple :
sur la cellule a1 montant du budget total fixe
sur a2 montant budget janvier évolutif
sur a3 montant budget fevrier évolutif
.. etc
je veux voir en sélectionnant les cellules a2 puis
a3, ..etc l'évolution du pourcentage du budget du mois
sélectionné par rapport au budget total.
est-ce possible?
"C'est effectivement du plus bel effet si on les laisse affichés"
Tu n'as jamais si bien dit.... ils demeurent tous affichés ! WoW !
;-)
Salutations!
"garnote" <rien@absent.net> a écrit dans le message de
news:B7o_b.74455$2g.74006@charlie.risq.qc.ca...
C'est effectivement du plus bel effet si on les laisse affichés
et ça simplifie mes macros.
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Column = 1 And Target.Row <> 1 Then Commentaires_Évolutifs
End Sub
Sub Commentaires_Évolutifs()
On Error Resume Next
Set ici = ActiveCell
If ici = "" Or Not IsNumeric(ici) Then
ici.ClearComments
Exit Sub
End If
t = Format(ici.Value / [a1], "percent")
With ici
.ClearComments
.AddComment
.Comment.Text Text:="Évolution: " & t
.Comment.Visible = True
.Comment.Shape.TextFrame.AutoSize = True
End With
End Sub
:-)
Serge
"michdenis" <michdenis@hotmail.com> a écrit dans le message de news:
eEpWHeh#DHA.1456@TK2MSFTNGP09.phx.gbl...
Bonjour Garnote,
Le seul "hic" c'est que l'on doive réellement sélectionner la cellule
pour
visualiser le commentaire ! M'enfin !!!
Salutations!
"garnote" <rien@absent.net> a écrit dans le message de
news:jIn_b.74450$2g.25943@charlie.risq.qc.ca...
Salut Denis,
J'ai un peu changé de fil !
Tes «publications» m'ont permis de «fioriturer» ma patente :
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Column <> 1 Then
Range("A:A").ClearComments
Else
If Target.Column = 1 And Target.Row <> 1 Then Commentaires_Évolutifs
End If
End Sub
Sub Commentaires_Évolutifs()
On Error Resume Next
Range("A:A").ClearComments
Set ici = ActiveCell
If ici = "" Or Not IsNumeric(ici) Then Exit Sub
t = Format(ici.Value / [a1], "percent")
With ici
.ClearComments
.AddComment
.Comment.Text Text:="Évolution: " & t
.Comment.Visible = True
.Comment.Shape.OLEFormat.Object.AutoSize = True
End With
End Sub
Serge
"michdenis" <michdenis@hotmail.com> a écrit dans le message de news:
uf2r1Hh#DHA.2348@TK2MSFTNGP09.phx.gbl...
Bonjour,
Dans le module feuille de ton classeur, copie ce qui suit :
Dans la procédure : Ces plages sont adaptées au besoin
En A1 = montant global
En A2:A12 Montant partiel
'------------------------------------
Private Sub Worksheet_Change(ByVal Target As Range)
Dim Rg As Range
Set Rg = Range("A2:A12")
If Target.Address = Range("A1").Address Then
If IsNumeric(Range("a1")) Then
If Range("A1") <> 0 Then
LesCommentaires Rg
End If
End If
End If
Set Rg = Intersect(Target, Range("A2:A12"))
If Not Rg Is Nothing Then
LesCommentaires Rg
End If
Set Rg = Nothing
End Sub
'------------------------------------
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Intersect(Target, Range("A2:A12")) Is Nothing Then
If Target.Cells.Count > 1 Then Exit Sub
Target.ClearComments
If IsNumeric(Range("A1")) And IsNumeric(Target) Then
If Range("A1") <> 0 And Target.Value <> 0 Then
Text = "Pourcentage : " & Format(Target.Value /
Range("A1"),
"percent")
Target.AddComment Text
End If
End If
End If
End Sub
'------------------------------------
Sub LesCommentaires(Rg As Range)
For Each c In Rg
c.ClearComments
If IsNumeric(c) Then
If c <> 0 Then
Text = "Pourcentage : " _
& Format(c.Value / Range("A1"), "percent")
c.AddComment Text
End If
End If
Next
End Sub
'------------------------------------
<anonymous@discussions.microsoft.com> a écrit dans le message de
news:14c1f01c3fa01$0e0d74a0$a001280a@phx.gbl...
bonjour, je cherche à faire apparaitre l'interprétation
du résultat d'une cellule sur son commentaire.
par exemple :
sur la cellule a1 montant du budget total fixe
sur a2 montant budget janvier évolutif
sur a3 montant budget fevrier évolutif
.. etc
je veux voir en sélectionnant les cellules a2 puis
a3, ..etc l'évolution du pourcentage du budget du mois
sélectionné par rapport au budget total.
est-ce possible?
"C'est effectivement du plus bel effet si on les laisse affichés"
Tu n'as jamais si bien dit.... ils demeurent tous affichés ! WoW !
;-)
Salutations!
"garnote" a écrit dans le message de
news:B7o_b.74455$
C'est effectivement du plus bel effet si on les laisse affichés
et ça simplifie mes macros.
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Column = 1 And Target.Row <> 1 Then Commentaires_Évolutifs
End Sub
Sub Commentaires_Évolutifs()
On Error Resume Next
Set ici = ActiveCell
If ici = "" Or Not IsNumeric(ici) Then
ici.ClearComments
Exit Sub
End If
t = Format(ici.Value / [a1], "percent")
With ici
.ClearComments
.AddComment
.Comment.Text Text:="Évolution: " & t
.Comment.Visible = True
.Comment.Shape.TextFrame.AutoSize = True
End With
End Sub
:-)
Serge
"michdenis" a écrit dans le message de news:
eEpWHeh#Bonjour Garnote,
Le seul "hic" c'est que l'on doive réellement sélectionner la cellule
pour
visualiser le commentaire ! M'enfin !!!
Salutations!
"garnote" a écrit dans le message de
news:jIn_b.74450$Salut Denis,
J'ai un peu changé de fil !
Tes «publications» m'ont permis de «fioriturer» ma patente :
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Column <> 1 Then
Range("A:A").ClearComments
Else
If Target.Column = 1 And Target.Row <> 1 Then Commentaires_Évolutifs
End If
End Sub
Sub Commentaires_Évolutifs()
On Error Resume Next
Range("A:A").ClearComments
Set ici = ActiveCell
If ici = "" Or Not IsNumeric(ici) Then Exit Sub
t = Format(ici.Value / [a1], "percent")
With ici
.ClearComments
.AddComment
.Comment.Text Text:="Évolution: " & t
.Comment.Visible = True
.Comment.Shape.OLEFormat.Object.AutoSize = True
End With
End Sub
Serge
"michdenis" a écrit dans le message de news:
uf2r1Hh#Bonjour,
Dans le module feuille de ton classeur, copie ce qui suit :
Dans la procédure : Ces plages sont adaptées au besoin
En A1 = montant global
En A2:A12 Montant partiel
'------------------------------------
Private Sub Worksheet_Change(ByVal Target As Range)
Dim Rg As Range
Set Rg = Range("A2:A12")
If Target.Address = Range("A1").Address Then
If IsNumeric(Range("a1")) Then
If Range("A1") <> 0 Then
LesCommentaires Rg
End If
End If
End If
Set Rg = Intersect(Target, Range("A2:A12"))
If Not Rg Is Nothing Then
LesCommentaires Rg
End If
Set Rg = Nothing
End Sub
'------------------------------------
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Intersect(Target, Range("A2:A12")) Is Nothing Then
If Target.Cells.Count > 1 Then Exit Sub
Target.ClearComments
If IsNumeric(Range("A1")) And IsNumeric(Target) Then
If Range("A1") <> 0 And Target.Value <> 0 Then
Text = "Pourcentage : " & Format(Target.Value /
Range("A1"),
"percent")Target.AddComment Text
End If
End If
End If
End Sub
'------------------------------------
Sub LesCommentaires(Rg As Range)
For Each c In Rg
c.ClearComments
If IsNumeric(c) Then
If c <> 0 Then
Text = "Pourcentage : " _
& Format(c.Value / Range("A1"), "percent")
c.AddComment Text
End If
End If
Next
End Sub
'------------------------------------
a écrit dans le message de
news:14c1f01c3fa01$0e0d74a0$bonjour, je cherche à faire apparaitre l'interprétation
du résultat d'une cellule sur son commentaire.
par exemple :
sur la cellule a1 montant du budget total fixe
sur a2 montant budget janvier évolutif
sur a3 montant budget fevrier évolutif
.. etc
je veux voir en sélectionnant les cellules a2 puis
a3, ..etc l'évolution du pourcentage du budget du mois
sélectionné par rapport au budget total.
est-ce possible?
"C'est effectivement du plus bel effet si on les laisse affichés"
Tu n'as jamais si bien dit.... ils demeurent tous affichés ! WoW !
;-)
Salutations!
"garnote" a écrit dans le message de
news:B7o_b.74455$
C'est effectivement du plus bel effet si on les laisse affichés
et ça simplifie mes macros.
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Column = 1 And Target.Row <> 1 Then Commentaires_Évolutifs
End Sub
Sub Commentaires_Évolutifs()
On Error Resume Next
Set ici = ActiveCell
If ici = "" Or Not IsNumeric(ici) Then
ici.ClearComments
Exit Sub
End If
t = Format(ici.Value / [a1], "percent")
With ici
.ClearComments
.AddComment
.Comment.Text Text:="Évolution: " & t
.Comment.Visible = True
.Comment.Shape.TextFrame.AutoSize = True
End With
End Sub
:-)
Serge
"michdenis" a écrit dans le message de news:
eEpWHeh#Bonjour Garnote,
Le seul "hic" c'est que l'on doive réellement sélectionner la cellule
pour
visualiser le commentaire ! M'enfin !!!
Salutations!
"garnote" a écrit dans le message de
news:jIn_b.74450$Salut Denis,
J'ai un peu changé de fil !
Tes «publications» m'ont permis de «fioriturer» ma patente :
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Column <> 1 Then
Range("A:A").ClearComments
Else
If Target.Column = 1 And Target.Row <> 1 Then Commentaires_Évolutifs
End If
End Sub
Sub Commentaires_Évolutifs()
On Error Resume Next
Range("A:A").ClearComments
Set ici = ActiveCell
If ici = "" Or Not IsNumeric(ici) Then Exit Sub
t = Format(ici.Value / [a1], "percent")
With ici
.ClearComments
.AddComment
.Comment.Text Text:="Évolution: " & t
.Comment.Visible = True
.Comment.Shape.OLEFormat.Object.AutoSize = True
End With
End Sub
Serge
"michdenis" a écrit dans le message de news:
uf2r1Hh#Bonjour,
Dans le module feuille de ton classeur, copie ce qui suit :
Dans la procédure : Ces plages sont adaptées au besoin
En A1 = montant global
En A2:A12 Montant partiel
'------------------------------------
Private Sub Worksheet_Change(ByVal Target As Range)
Dim Rg As Range
Set Rg = Range("A2:A12")
If Target.Address = Range("A1").Address Then
If IsNumeric(Range("a1")) Then
If Range("A1") <> 0 Then
LesCommentaires Rg
End If
End If
End If
Set Rg = Intersect(Target, Range("A2:A12"))
If Not Rg Is Nothing Then
LesCommentaires Rg
End If
Set Rg = Nothing
End Sub
'------------------------------------
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Intersect(Target, Range("A2:A12")) Is Nothing Then
If Target.Cells.Count > 1 Then Exit Sub
Target.ClearComments
If IsNumeric(Range("A1")) And IsNumeric(Target) Then
If Range("A1") <> 0 And Target.Value <> 0 Then
Text = "Pourcentage : " & Format(Target.Value /
Range("A1"),
"percent")Target.AddComment Text
End If
End If
End If
End Sub
'------------------------------------
Sub LesCommentaires(Rg As Range)
For Each c In Rg
c.ClearComments
If IsNumeric(c) Then
If c <> 0 Then
Text = "Pourcentage : " _
& Format(c.Value / Range("A1"), "percent")
c.AddComment Text
End If
End If
Next
End Sub
'------------------------------------
a écrit dans le message de
news:14c1f01c3fa01$0e0d74a0$bonjour, je cherche à faire apparaitre l'interprétation
du résultat d'une cellule sur son commentaire.
par exemple :
sur la cellule a1 montant du budget total fixe
sur a2 montant budget janvier évolutif
sur a3 montant budget fevrier évolutif
.. etc
je veux voir en sélectionnant les cellules a2 puis
a3, ..etc l'évolution du pourcentage du budget du mois
sélectionné par rapport au budget total.
est-ce possible?
"C'est effectivement du plus bel effet si on les laisse affichés"
Tu n'as jamais si bien dit.... ils demeurent tous affichés ! WoW !
;-)
Salutations!
"garnote" <rien@absent.net> a écrit dans le message de
news:B7o_b.74455$2g.74006@charlie.risq.qc.ca...
C'est effectivement du plus bel effet si on les laisse affichés
et ça simplifie mes macros.
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Column = 1 And Target.Row <> 1 Then Commentaires_Évolutifs
End Sub
Sub Commentaires_Évolutifs()
On Error Resume Next
Set ici = ActiveCell
If ici = "" Or Not IsNumeric(ici) Then
ici.ClearComments
Exit Sub
End If
t = Format(ici.Value / [a1], "percent")
With ici
.ClearComments
.AddComment
.Comment.Text Text:="Évolution: " & t
.Comment.Visible = True
.Comment.Shape.TextFrame.AutoSize = True
End With
End Sub
:-)
Serge
"michdenis" <michdenis@hotmail.com> a écrit dans le message de news:
eEpWHeh#DHA.1456@TK2MSFTNGP09.phx.gbl...
Bonjour Garnote,
Le seul "hic" c'est que l'on doive réellement sélectionner la cellule
pour
visualiser le commentaire ! M'enfin !!!
Salutations!
"garnote" <rien@absent.net> a écrit dans le message de
news:jIn_b.74450$2g.25943@charlie.risq.qc.ca...
Salut Denis,
J'ai un peu changé de fil !
Tes «publications» m'ont permis de «fioriturer» ma patente :
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Column <> 1 Then
Range("A:A").ClearComments
Else
If Target.Column = 1 And Target.Row <> 1 Then Commentaires_Évolutifs
End If
End Sub
Sub Commentaires_Évolutifs()
On Error Resume Next
Range("A:A").ClearComments
Set ici = ActiveCell
If ici = "" Or Not IsNumeric(ici) Then Exit Sub
t = Format(ici.Value / [a1], "percent")
With ici
.ClearComments
.AddComment
.Comment.Text Text:="Évolution: " & t
.Comment.Visible = True
.Comment.Shape.OLEFormat.Object.AutoSize = True
End With
End Sub
Serge
"michdenis" <michdenis@hotmail.com> a écrit dans le message de news:
uf2r1Hh#DHA.2348@TK2MSFTNGP09.phx.gbl...
Bonjour,
Dans le module feuille de ton classeur, copie ce qui suit :
Dans la procédure : Ces plages sont adaptées au besoin
En A1 = montant global
En A2:A12 Montant partiel
'------------------------------------
Private Sub Worksheet_Change(ByVal Target As Range)
Dim Rg As Range
Set Rg = Range("A2:A12")
If Target.Address = Range("A1").Address Then
If IsNumeric(Range("a1")) Then
If Range("A1") <> 0 Then
LesCommentaires Rg
End If
End If
End If
Set Rg = Intersect(Target, Range("A2:A12"))
If Not Rg Is Nothing Then
LesCommentaires Rg
End If
Set Rg = Nothing
End Sub
'------------------------------------
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Intersect(Target, Range("A2:A12")) Is Nothing Then
If Target.Cells.Count > 1 Then Exit Sub
Target.ClearComments
If IsNumeric(Range("A1")) And IsNumeric(Target) Then
If Range("A1") <> 0 And Target.Value <> 0 Then
Text = "Pourcentage : " & Format(Target.Value /
Range("A1"),
"percent")
Target.AddComment Text
End If
End If
End If
End Sub
'------------------------------------
Sub LesCommentaires(Rg As Range)
For Each c In Rg
c.ClearComments
If IsNumeric(c) Then
If c <> 0 Then
Text = "Pourcentage : " _
& Format(c.Value / Range("A1"), "percent")
c.AddComment Text
End If
End If
Next
End Sub
'------------------------------------
<anonymous@discussions.microsoft.com> a écrit dans le message de
news:14c1f01c3fa01$0e0d74a0$a001280a@phx.gbl...
bonjour, je cherche à faire apparaitre l'interprétation
du résultat d'une cellule sur son commentaire.
par exemple :
sur la cellule a1 montant du budget total fixe
sur a2 montant budget janvier évolutif
sur a3 montant budget fevrier évolutif
.. etc
je veux voir en sélectionnant les cellules a2 puis
a3, ..etc l'évolution du pourcentage du budget du mois
sélectionné par rapport au budget total.
est-ce possible?
"C'est effectivement du plus bel effet si on les laisse affichés"
Tu n'as jamais si bien dit.... ils demeurent tous affichés ! WoW !
;-)
Salutations!
"garnote" a écrit dans le message de
news:B7o_b.74455$
C'est effectivement du plus bel effet si on les laisse affichés
et ça simplifie mes macros.
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Column = 1 And Target.Row <> 1 Then Commentaires_Évolutifs
End Sub
Sub Commentaires_Évolutifs()
On Error Resume Next
Set ici = ActiveCell
If ici = "" Or Not IsNumeric(ici) Then
ici.ClearComments
Exit Sub
End If
t = Format(ici.Value / [a1], "percent")
With ici
.ClearComments
.AddComment
.Comment.Text Text:="Évolution: " & t
.Comment.Visible = True
.Comment.Shape.TextFrame.AutoSize = True
End With
End Sub
:-)
Serge
"michdenis" a écrit dans le message de news:
eEpWHeh#Bonjour Garnote,
Le seul "hic" c'est que l'on doive réellement sélectionner la cellule
pour
visualiser le commentaire ! M'enfin !!!
Salutations!
"garnote" a écrit dans le message de
news:jIn_b.74450$Salut Denis,
J'ai un peu changé de fil !
Tes «publications» m'ont permis de «fioriturer» ma patente :
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Column <> 1 Then
Range("A:A").ClearComments
Else
If Target.Column = 1 And Target.Row <> 1 Then Commentaires_Évolutifs
End If
End Sub
Sub Commentaires_Évolutifs()
On Error Resume Next
Range("A:A").ClearComments
Set ici = ActiveCell
If ici = "" Or Not IsNumeric(ici) Then Exit Sub
t = Format(ici.Value / [a1], "percent")
With ici
.ClearComments
.AddComment
.Comment.Text Text:="Évolution: " & t
.Comment.Visible = True
.Comment.Shape.OLEFormat.Object.AutoSize = True
End With
End Sub
Serge
"michdenis" a écrit dans le message de news:
uf2r1Hh#Bonjour,
Dans le module feuille de ton classeur, copie ce qui suit :
Dans la procédure : Ces plages sont adaptées au besoin
En A1 = montant global
En A2:A12 Montant partiel
'------------------------------------
Private Sub Worksheet_Change(ByVal Target As Range)
Dim Rg As Range
Set Rg = Range("A2:A12")
If Target.Address = Range("A1").Address Then
If IsNumeric(Range("a1")) Then
If Range("A1") <> 0 Then
LesCommentaires Rg
End If
End If
End If
Set Rg = Intersect(Target, Range("A2:A12"))
If Not Rg Is Nothing Then
LesCommentaires Rg
End If
Set Rg = Nothing
End Sub
'------------------------------------
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Intersect(Target, Range("A2:A12")) Is Nothing Then
If Target.Cells.Count > 1 Then Exit Sub
Target.ClearComments
If IsNumeric(Range("A1")) And IsNumeric(Target) Then
If Range("A1") <> 0 And Target.Value <> 0 Then
Text = "Pourcentage : " & Format(Target.Value /
Range("A1"),
"percent")Target.AddComment Text
End If
End If
End If
End Sub
'------------------------------------
Sub LesCommentaires(Rg As Range)
For Each c In Rg
c.ClearComments
If IsNumeric(c) Then
If c <> 0 Then
Text = "Pourcentage : " _
& Format(c.Value / Range("A1"), "percent")
c.AddComment Text
End If
End If
Next
End Sub
'------------------------------------
a écrit dans le message de
news:14c1f01c3fa01$0e0d74a0$bonjour, je cherche à faire apparaitre l'interprétation
du résultat d'une cellule sur son commentaire.
par exemple :
sur la cellule a1 montant du budget total fixe
sur a2 montant budget janvier évolutif
sur a3 montant budget fevrier évolutif
.. etc
je veux voir en sélectionnant les cellules a2 puis
a3, ..etc l'évolution du pourcentage du budget du mois
sélectionné par rapport au budget total.
est-ce possible?
"Se gausse-t-on de moi ?"
Absolument pas... mais un fait demeure, les commentaires s'affichent en
permanence à l'écran !
N'était-ce pas de cet effet dont tu parlais ?
;-)
Salutations!
"garnote" a écrit dans le message de
news:6io_b.74459$
Se gausse-t-on de moi ?
:-)
Moé
"Denis Michon" a écrit dans le message de news:
mbo_b.74457$"C'est effectivement du plus bel effet si on les laisse affichés"
Tu n'as jamais si bien dit.... ils demeurent tous affichés ! WoW !
;-)
Salutations!
"garnote" a écrit dans le message de
news:B7o_b.74455$C'est effectivement du plus bel effet si on les laisse affichés
et ça simplifie mes macros.
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Column = 1 And Target.Row <> 1 Then Commentaires_Évolutifs
End Sub
Sub Commentaires_Évolutifs()
On Error Resume Next
Set ici = ActiveCell
If ici = "" Or Not IsNumeric(ici) Then
ici.ClearComments
Exit Sub
End If
t = Format(ici.Value / [a1], "percent")
With ici
.ClearComments
.AddComment
.Comment.Text Text:="Évolution: " & t
.Comment.Visible = True
.Comment.Shape.TextFrame.AutoSize = True
End With
End Sub
:-)
Serge
"michdenis" a écrit dans le message de news:
eEpWHeh#Bonjour Garnote,
Le seul "hic" c'est que l'on doive réellement sélectionner la cellule
pourvisualiser le commentaire ! M'enfin !!!
Salutations!
"garnote" a écrit dans le message de
news:jIn_b.74450$Salut Denis,
J'ai un peu changé de fil !
Tes «publications» m'ont permis de «fioriturer» ma patente :
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Column <> 1 Then
Range("A:A").ClearComments
Else
If Target.Column = 1 And Target.Row <> 1 Then
Commentaires_Évolutifs
End If
End Sub
Sub Commentaires_Évolutifs()
On Error Resume Next
Range("A:A").ClearComments
Set ici = ActiveCell
If ici = "" Or Not IsNumeric(ici) Then Exit Sub
t = Format(ici.Value / [a1], "percent")
With ici
.ClearComments
.AddComment
.Comment.Text Text:="Évolution: " & t
.Comment.Visible = True
.Comment.Shape.OLEFormat.Object.AutoSize = True
End With
End Sub
Serge
"michdenis" a écrit dans le message de news:
uf2r1Hh#Bonjour,
Dans le module feuille de ton classeur, copie ce qui suit :
Dans la procédure : Ces plages sont adaptées au besoin
En A1 = montant global
En A2:A12 Montant partiel
'------------------------------------
Private Sub Worksheet_Change(ByVal Target As Range)
Dim Rg As Range
Set Rg = Range("A2:A12")
If Target.Address = Range("A1").Address Then
If IsNumeric(Range("a1")) Then
If Range("A1") <> 0 Then
LesCommentaires Rg
End If
End If
End If
Set Rg = Intersect(Target, Range("A2:A12"))
If Not Rg Is Nothing Then
LesCommentaires Rg
End If
Set Rg = Nothing
End Sub
'------------------------------------
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Intersect(Target, Range("A2:A12")) Is Nothing Then
If Target.Cells.Count > 1 Then Exit Sub
Target.ClearComments
If IsNumeric(Range("A1")) And IsNumeric(Target) Then
If Range("A1") <> 0 And Target.Value <> 0 Then
Text = "Pourcentage : " & Format(Target.Value /
Range("A1"),"percent")Target.AddComment Text
End If
End If
End If
End Sub
'------------------------------------
Sub LesCommentaires(Rg As Range)
For Each c In Rg
c.ClearComments
If IsNumeric(c) Then
If c <> 0 Then
Text = "Pourcentage : " _
& Format(c.Value / Range("A1"), "percent")
c.AddComment Text
End If
End If
Next
End Sub
'------------------------------------
a écrit dans le message de
news:14c1f01c3fa01$0e0d74a0$bonjour, je cherche à faire apparaitre l'interprétation
du résultat d'une cellule sur son commentaire.
par exemple :
sur la cellule a1 montant du budget total fixe
sur a2 montant budget janvier évolutif
sur a3 montant budget fevrier évolutif
.. etc
je veux voir en sélectionnant les cellules a2 puis
a3, ..etc l'évolution du pourcentage du budget du mois
sélectionné par rapport au budget total.
est-ce possible?
"Se gausse-t-on de moi ?"
Absolument pas... mais un fait demeure, les commentaires s'affichent en
permanence à l'écran !
N'était-ce pas de cet effet dont tu parlais ?
;-)
Salutations!
"garnote" <rien@absent.net> a écrit dans le message de
news:6io_b.74459$2g.11497@charlie.risq.qc.ca...
Se gausse-t-on de moi ?
:-)
Moé
"Denis Michon" <denis.michon@cgocable.ca> a écrit dans le message de news:
mbo_b.74457$2g.48895@charlie.risq.qc.ca...
"C'est effectivement du plus bel effet si on les laisse affichés"
Tu n'as jamais si bien dit.... ils demeurent tous affichés ! WoW !
;-)
Salutations!
"garnote" <rien@absent.net> a écrit dans le message de
news:B7o_b.74455$2g.74006@charlie.risq.qc.ca...
C'est effectivement du plus bel effet si on les laisse affichés
et ça simplifie mes macros.
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Column = 1 And Target.Row <> 1 Then Commentaires_Évolutifs
End Sub
Sub Commentaires_Évolutifs()
On Error Resume Next
Set ici = ActiveCell
If ici = "" Or Not IsNumeric(ici) Then
ici.ClearComments
Exit Sub
End If
t = Format(ici.Value / [a1], "percent")
With ici
.ClearComments
.AddComment
.Comment.Text Text:="Évolution: " & t
.Comment.Visible = True
.Comment.Shape.TextFrame.AutoSize = True
End With
End Sub
:-)
Serge
"michdenis" <michdenis@hotmail.com> a écrit dans le message de news:
eEpWHeh#DHA.1456@TK2MSFTNGP09.phx.gbl...
Bonjour Garnote,
Le seul "hic" c'est que l'on doive réellement sélectionner la cellule
pour
visualiser le commentaire ! M'enfin !!!
Salutations!
"garnote" <rien@absent.net> a écrit dans le message de
news:jIn_b.74450$2g.25943@charlie.risq.qc.ca...
Salut Denis,
J'ai un peu changé de fil !
Tes «publications» m'ont permis de «fioriturer» ma patente :
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Column <> 1 Then
Range("A:A").ClearComments
Else
If Target.Column = 1 And Target.Row <> 1 Then
Commentaires_Évolutifs
End If
End Sub
Sub Commentaires_Évolutifs()
On Error Resume Next
Range("A:A").ClearComments
Set ici = ActiveCell
If ici = "" Or Not IsNumeric(ici) Then Exit Sub
t = Format(ici.Value / [a1], "percent")
With ici
.ClearComments
.AddComment
.Comment.Text Text:="Évolution: " & t
.Comment.Visible = True
.Comment.Shape.OLEFormat.Object.AutoSize = True
End With
End Sub
Serge
"michdenis" <michdenis@hotmail.com> a écrit dans le message de news:
uf2r1Hh#DHA.2348@TK2MSFTNGP09.phx.gbl...
Bonjour,
Dans le module feuille de ton classeur, copie ce qui suit :
Dans la procédure : Ces plages sont adaptées au besoin
En A1 = montant global
En A2:A12 Montant partiel
'------------------------------------
Private Sub Worksheet_Change(ByVal Target As Range)
Dim Rg As Range
Set Rg = Range("A2:A12")
If Target.Address = Range("A1").Address Then
If IsNumeric(Range("a1")) Then
If Range("A1") <> 0 Then
LesCommentaires Rg
End If
End If
End If
Set Rg = Intersect(Target, Range("A2:A12"))
If Not Rg Is Nothing Then
LesCommentaires Rg
End If
Set Rg = Nothing
End Sub
'------------------------------------
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Intersect(Target, Range("A2:A12")) Is Nothing Then
If Target.Cells.Count > 1 Then Exit Sub
Target.ClearComments
If IsNumeric(Range("A1")) And IsNumeric(Target) Then
If Range("A1") <> 0 And Target.Value <> 0 Then
Text = "Pourcentage : " & Format(Target.Value /
Range("A1"),
"percent")
Target.AddComment Text
End If
End If
End If
End Sub
'------------------------------------
Sub LesCommentaires(Rg As Range)
For Each c In Rg
c.ClearComments
If IsNumeric(c) Then
If c <> 0 Then
Text = "Pourcentage : " _
& Format(c.Value / Range("A1"), "percent")
c.AddComment Text
End If
End If
Next
End Sub
'------------------------------------
<anonymous@discussions.microsoft.com> a écrit dans le message de
news:14c1f01c3fa01$0e0d74a0$a001280a@phx.gbl...
bonjour, je cherche à faire apparaitre l'interprétation
du résultat d'une cellule sur son commentaire.
par exemple :
sur la cellule a1 montant du budget total fixe
sur a2 montant budget janvier évolutif
sur a3 montant budget fevrier évolutif
.. etc
je veux voir en sélectionnant les cellules a2 puis
a3, ..etc l'évolution du pourcentage du budget du mois
sélectionné par rapport au budget total.
est-ce possible?
"Se gausse-t-on de moi ?"
Absolument pas... mais un fait demeure, les commentaires s'affichent en
permanence à l'écran !
N'était-ce pas de cet effet dont tu parlais ?
;-)
Salutations!
"garnote" a écrit dans le message de
news:6io_b.74459$
Se gausse-t-on de moi ?
:-)
Moé
"Denis Michon" a écrit dans le message de news:
mbo_b.74457$"C'est effectivement du plus bel effet si on les laisse affichés"
Tu n'as jamais si bien dit.... ils demeurent tous affichés ! WoW !
;-)
Salutations!
"garnote" a écrit dans le message de
news:B7o_b.74455$C'est effectivement du plus bel effet si on les laisse affichés
et ça simplifie mes macros.
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Column = 1 And Target.Row <> 1 Then Commentaires_Évolutifs
End Sub
Sub Commentaires_Évolutifs()
On Error Resume Next
Set ici = ActiveCell
If ici = "" Or Not IsNumeric(ici) Then
ici.ClearComments
Exit Sub
End If
t = Format(ici.Value / [a1], "percent")
With ici
.ClearComments
.AddComment
.Comment.Text Text:="Évolution: " & t
.Comment.Visible = True
.Comment.Shape.TextFrame.AutoSize = True
End With
End Sub
:-)
Serge
"michdenis" a écrit dans le message de news:
eEpWHeh#Bonjour Garnote,
Le seul "hic" c'est que l'on doive réellement sélectionner la cellule
pourvisualiser le commentaire ! M'enfin !!!
Salutations!
"garnote" a écrit dans le message de
news:jIn_b.74450$Salut Denis,
J'ai un peu changé de fil !
Tes «publications» m'ont permis de «fioriturer» ma patente :
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Column <> 1 Then
Range("A:A").ClearComments
Else
If Target.Column = 1 And Target.Row <> 1 Then
Commentaires_Évolutifs
End If
End Sub
Sub Commentaires_Évolutifs()
On Error Resume Next
Range("A:A").ClearComments
Set ici = ActiveCell
If ici = "" Or Not IsNumeric(ici) Then Exit Sub
t = Format(ici.Value / [a1], "percent")
With ici
.ClearComments
.AddComment
.Comment.Text Text:="Évolution: " & t
.Comment.Visible = True
.Comment.Shape.OLEFormat.Object.AutoSize = True
End With
End Sub
Serge
"michdenis" a écrit dans le message de news:
uf2r1Hh#Bonjour,
Dans le module feuille de ton classeur, copie ce qui suit :
Dans la procédure : Ces plages sont adaptées au besoin
En A1 = montant global
En A2:A12 Montant partiel
'------------------------------------
Private Sub Worksheet_Change(ByVal Target As Range)
Dim Rg As Range
Set Rg = Range("A2:A12")
If Target.Address = Range("A1").Address Then
If IsNumeric(Range("a1")) Then
If Range("A1") <> 0 Then
LesCommentaires Rg
End If
End If
End If
Set Rg = Intersect(Target, Range("A2:A12"))
If Not Rg Is Nothing Then
LesCommentaires Rg
End If
Set Rg = Nothing
End Sub
'------------------------------------
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Intersect(Target, Range("A2:A12")) Is Nothing Then
If Target.Cells.Count > 1 Then Exit Sub
Target.ClearComments
If IsNumeric(Range("A1")) And IsNumeric(Target) Then
If Range("A1") <> 0 And Target.Value <> 0 Then
Text = "Pourcentage : " & Format(Target.Value /
Range("A1"),"percent")Target.AddComment Text
End If
End If
End If
End Sub
'------------------------------------
Sub LesCommentaires(Rg As Range)
For Each c In Rg
c.ClearComments
If IsNumeric(c) Then
If c <> 0 Then
Text = "Pourcentage : " _
& Format(c.Value / Range("A1"), "percent")
c.AddComment Text
End If
End If
Next
End Sub
'------------------------------------
a écrit dans le message de
news:14c1f01c3fa01$0e0d74a0$bonjour, je cherche à faire apparaitre l'interprétation
du résultat d'une cellule sur son commentaire.
par exemple :
sur la cellule a1 montant du budget total fixe
sur a2 montant budget janvier évolutif
sur a3 montant budget fevrier évolutif
.. etc
je veux voir en sélectionnant les cellules a2 puis
a3, ..etc l'évolution du pourcentage du budget du mois
sélectionné par rapport au budget total.
est-ce possible?
"Se gausse-t-on de moi ?"
Absolument pas... mais un fait demeure, les commentaires s'affichent en
permanence à l'écran !
N'était-ce pas de cet effet dont tu parlais ?
;-)
Salutations!
"garnote" a écrit dans le message de
news:6io_b.74459$
Se gausse-t-on de moi ?
:-)
Moé
"Denis Michon" a écrit dans le message de news:
mbo_b.74457$"C'est effectivement du plus bel effet si on les laisse affichés"
Tu n'as jamais si bien dit.... ils demeurent tous affichés ! WoW !
;-)
Salutations!
"garnote" a écrit dans le message de
news:B7o_b.74455$C'est effectivement du plus bel effet si on les laisse affichés
et ça simplifie mes macros.
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Column = 1 And Target.Row <> 1 Then Commentaires_Évolutifs
End Sub
Sub Commentaires_Évolutifs()
On Error Resume Next
Set ici = ActiveCell
If ici = "" Or Not IsNumeric(ici) Then
ici.ClearComments
Exit Sub
End If
t = Format(ici.Value / [a1], "percent")
With ici
.ClearComments
.AddComment
.Comment.Text Text:="Évolution: " & t
.Comment.Visible = True
.Comment.Shape.TextFrame.AutoSize = True
End With
End Sub
:-)
Serge
"michdenis" a écrit dans le message de news:
eEpWHeh#Bonjour Garnote,
Le seul "hic" c'est que l'on doive réellement sélectionner la cellule
pourvisualiser le commentaire ! M'enfin !!!
Salutations!
"garnote" a écrit dans le message de
news:jIn_b.74450$Salut Denis,
J'ai un peu changé de fil !
Tes «publications» m'ont permis de «fioriturer» ma patente :
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Column <> 1 Then
Range("A:A").ClearComments
Else
If Target.Column = 1 And Target.Row <> 1 Then
Commentaires_Évolutifs
End If
End Sub
Sub Commentaires_Évolutifs()
On Error Resume Next
Range("A:A").ClearComments
Set ici = ActiveCell
If ici = "" Or Not IsNumeric(ici) Then Exit Sub
t = Format(ici.Value / [a1], "percent")
With ici
.ClearComments
.AddComment
.Comment.Text Text:="Évolution: " & t
.Comment.Visible = True
.Comment.Shape.OLEFormat.Object.AutoSize = True
End With
End Sub
Serge
"michdenis" a écrit dans le message de news:
uf2r1Hh#Bonjour,
Dans le module feuille de ton classeur, copie ce qui suit :
Dans la procédure : Ces plages sont adaptées au besoin
En A1 = montant global
En A2:A12 Montant partiel
'------------------------------------
Private Sub Worksheet_Change(ByVal Target As Range)
Dim Rg As Range
Set Rg = Range("A2:A12")
If Target.Address = Range("A1").Address Then
If IsNumeric(Range("a1")) Then
If Range("A1") <> 0 Then
LesCommentaires Rg
End If
End If
End If
Set Rg = Intersect(Target, Range("A2:A12"))
If Not Rg Is Nothing Then
LesCommentaires Rg
End If
Set Rg = Nothing
End Sub
'------------------------------------
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Intersect(Target, Range("A2:A12")) Is Nothing Then
If Target.Cells.Count > 1 Then Exit Sub
Target.ClearComments
If IsNumeric(Range("A1")) And IsNumeric(Target) Then
If Range("A1") <> 0 And Target.Value <> 0 Then
Text = "Pourcentage : " & Format(Target.Value /
Range("A1"),"percent")Target.AddComment Text
End If
End If
End If
End Sub
'------------------------------------
Sub LesCommentaires(Rg As Range)
For Each c In Rg
c.ClearComments
If IsNumeric(c) Then
If c <> 0 Then
Text = "Pourcentage : " _
& Format(c.Value / Range("A1"), "percent")
c.AddComment Text
End If
End If
Next
End Sub
'------------------------------------
a écrit dans le message de
news:14c1f01c3fa01$0e0d74a0$bonjour, je cherche à faire apparaitre l'interprétation
du résultat d'une cellule sur son commentaire.
par exemple :
sur la cellule a1 montant du budget total fixe
sur a2 montant budget janvier évolutif
sur a3 montant budget fevrier évolutif
.. etc
je veux voir en sélectionnant les cellules a2 puis
a3, ..etc l'évolution du pourcentage du budget du mois
sélectionné par rapport au budget total.
est-ce possible?
"Se gausse-t-on de moi ?"
Absolument pas... mais un fait demeure, les commentaires s'affichent en
permanence à l'écran !
N'était-ce pas de cet effet dont tu parlais ?
;-)
Salutations!
"garnote" <rien@absent.net> a écrit dans le message de
news:6io_b.74459$2g.11497@charlie.risq.qc.ca...
Se gausse-t-on de moi ?
:-)
Moé
"Denis Michon" <denis.michon@cgocable.ca> a écrit dans le message de news:
mbo_b.74457$2g.48895@charlie.risq.qc.ca...
"C'est effectivement du plus bel effet si on les laisse affichés"
Tu n'as jamais si bien dit.... ils demeurent tous affichés ! WoW !
;-)
Salutations!
"garnote" <rien@absent.net> a écrit dans le message de
news:B7o_b.74455$2g.74006@charlie.risq.qc.ca...
C'est effectivement du plus bel effet si on les laisse affichés
et ça simplifie mes macros.
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Column = 1 And Target.Row <> 1 Then Commentaires_Évolutifs
End Sub
Sub Commentaires_Évolutifs()
On Error Resume Next
Set ici = ActiveCell
If ici = "" Or Not IsNumeric(ici) Then
ici.ClearComments
Exit Sub
End If
t = Format(ici.Value / [a1], "percent")
With ici
.ClearComments
.AddComment
.Comment.Text Text:="Évolution: " & t
.Comment.Visible = True
.Comment.Shape.TextFrame.AutoSize = True
End With
End Sub
:-)
Serge
"michdenis" <michdenis@hotmail.com> a écrit dans le message de news:
eEpWHeh#DHA.1456@TK2MSFTNGP09.phx.gbl...
Bonjour Garnote,
Le seul "hic" c'est que l'on doive réellement sélectionner la cellule
pour
visualiser le commentaire ! M'enfin !!!
Salutations!
"garnote" <rien@absent.net> a écrit dans le message de
news:jIn_b.74450$2g.25943@charlie.risq.qc.ca...
Salut Denis,
J'ai un peu changé de fil !
Tes «publications» m'ont permis de «fioriturer» ma patente :
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Column <> 1 Then
Range("A:A").ClearComments
Else
If Target.Column = 1 And Target.Row <> 1 Then
Commentaires_Évolutifs
End If
End Sub
Sub Commentaires_Évolutifs()
On Error Resume Next
Range("A:A").ClearComments
Set ici = ActiveCell
If ici = "" Or Not IsNumeric(ici) Then Exit Sub
t = Format(ici.Value / [a1], "percent")
With ici
.ClearComments
.AddComment
.Comment.Text Text:="Évolution: " & t
.Comment.Visible = True
.Comment.Shape.OLEFormat.Object.AutoSize = True
End With
End Sub
Serge
"michdenis" <michdenis@hotmail.com> a écrit dans le message de news:
uf2r1Hh#DHA.2348@TK2MSFTNGP09.phx.gbl...
Bonjour,
Dans le module feuille de ton classeur, copie ce qui suit :
Dans la procédure : Ces plages sont adaptées au besoin
En A1 = montant global
En A2:A12 Montant partiel
'------------------------------------
Private Sub Worksheet_Change(ByVal Target As Range)
Dim Rg As Range
Set Rg = Range("A2:A12")
If Target.Address = Range("A1").Address Then
If IsNumeric(Range("a1")) Then
If Range("A1") <> 0 Then
LesCommentaires Rg
End If
End If
End If
Set Rg = Intersect(Target, Range("A2:A12"))
If Not Rg Is Nothing Then
LesCommentaires Rg
End If
Set Rg = Nothing
End Sub
'------------------------------------
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Intersect(Target, Range("A2:A12")) Is Nothing Then
If Target.Cells.Count > 1 Then Exit Sub
Target.ClearComments
If IsNumeric(Range("A1")) And IsNumeric(Target) Then
If Range("A1") <> 0 And Target.Value <> 0 Then
Text = "Pourcentage : " & Format(Target.Value /
Range("A1"),
"percent")
Target.AddComment Text
End If
End If
End If
End Sub
'------------------------------------
Sub LesCommentaires(Rg As Range)
For Each c In Rg
c.ClearComments
If IsNumeric(c) Then
If c <> 0 Then
Text = "Pourcentage : " _
& Format(c.Value / Range("A1"), "percent")
c.AddComment Text
End If
End If
Next
End Sub
'------------------------------------
<anonymous@discussions.microsoft.com> a écrit dans le message de
news:14c1f01c3fa01$0e0d74a0$a001280a@phx.gbl...
bonjour, je cherche à faire apparaitre l'interprétation
du résultat d'une cellule sur son commentaire.
par exemple :
sur la cellule a1 montant du budget total fixe
sur a2 montant budget janvier évolutif
sur a3 montant budget fevrier évolutif
.. etc
je veux voir en sélectionnant les cellules a2 puis
a3, ..etc l'évolution du pourcentage du budget du mois
sélectionné par rapport au budget total.
est-ce possible?
"Se gausse-t-on de moi ?"
Absolument pas... mais un fait demeure, les commentaires s'affichent en
permanence à l'écran !
N'était-ce pas de cet effet dont tu parlais ?
;-)
Salutations!
"garnote" a écrit dans le message de
news:6io_b.74459$
Se gausse-t-on de moi ?
:-)
Moé
"Denis Michon" a écrit dans le message de news:
mbo_b.74457$"C'est effectivement du plus bel effet si on les laisse affichés"
Tu n'as jamais si bien dit.... ils demeurent tous affichés ! WoW !
;-)
Salutations!
"garnote" a écrit dans le message de
news:B7o_b.74455$C'est effectivement du plus bel effet si on les laisse affichés
et ça simplifie mes macros.
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Column = 1 And Target.Row <> 1 Then Commentaires_Évolutifs
End Sub
Sub Commentaires_Évolutifs()
On Error Resume Next
Set ici = ActiveCell
If ici = "" Or Not IsNumeric(ici) Then
ici.ClearComments
Exit Sub
End If
t = Format(ici.Value / [a1], "percent")
With ici
.ClearComments
.AddComment
.Comment.Text Text:="Évolution: " & t
.Comment.Visible = True
.Comment.Shape.TextFrame.AutoSize = True
End With
End Sub
:-)
Serge
"michdenis" a écrit dans le message de news:
eEpWHeh#Bonjour Garnote,
Le seul "hic" c'est que l'on doive réellement sélectionner la cellule
pourvisualiser le commentaire ! M'enfin !!!
Salutations!
"garnote" a écrit dans le message de
news:jIn_b.74450$Salut Denis,
J'ai un peu changé de fil !
Tes «publications» m'ont permis de «fioriturer» ma patente :
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Column <> 1 Then
Range("A:A").ClearComments
Else
If Target.Column = 1 And Target.Row <> 1 Then
Commentaires_Évolutifs
End If
End Sub
Sub Commentaires_Évolutifs()
On Error Resume Next
Range("A:A").ClearComments
Set ici = ActiveCell
If ici = "" Or Not IsNumeric(ici) Then Exit Sub
t = Format(ici.Value / [a1], "percent")
With ici
.ClearComments
.AddComment
.Comment.Text Text:="Évolution: " & t
.Comment.Visible = True
.Comment.Shape.OLEFormat.Object.AutoSize = True
End With
End Sub
Serge
"michdenis" a écrit dans le message de news:
uf2r1Hh#Bonjour,
Dans le module feuille de ton classeur, copie ce qui suit :
Dans la procédure : Ces plages sont adaptées au besoin
En A1 = montant global
En A2:A12 Montant partiel
'------------------------------------
Private Sub Worksheet_Change(ByVal Target As Range)
Dim Rg As Range
Set Rg = Range("A2:A12")
If Target.Address = Range("A1").Address Then
If IsNumeric(Range("a1")) Then
If Range("A1") <> 0 Then
LesCommentaires Rg
End If
End If
End If
Set Rg = Intersect(Target, Range("A2:A12"))
If Not Rg Is Nothing Then
LesCommentaires Rg
End If
Set Rg = Nothing
End Sub
'------------------------------------
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Intersect(Target, Range("A2:A12")) Is Nothing Then
If Target.Cells.Count > 1 Then Exit Sub
Target.ClearComments
If IsNumeric(Range("A1")) And IsNumeric(Target) Then
If Range("A1") <> 0 And Target.Value <> 0 Then
Text = "Pourcentage : " & Format(Target.Value /
Range("A1"),"percent")Target.AddComment Text
End If
End If
End If
End Sub
'------------------------------------
Sub LesCommentaires(Rg As Range)
For Each c In Rg
c.ClearComments
If IsNumeric(c) Then
If c <> 0 Then
Text = "Pourcentage : " _
& Format(c.Value / Range("A1"), "percent")
c.AddComment Text
End If
End If
Next
End Sub
'------------------------------------
a écrit dans le message de
news:14c1f01c3fa01$0e0d74a0$bonjour, je cherche à faire apparaitre l'interprétation
du résultat d'une cellule sur son commentaire.
par exemple :
sur la cellule a1 montant du budget total fixe
sur a2 montant budget janvier évolutif
sur a3 montant budget fevrier évolutif
.. etc
je veux voir en sélectionnant les cellules a2 puis
a3, ..etc l'évolution du pourcentage du budget du mois
sélectionné par rapport au budget total.
est-ce possible?