Macro majuscule nompropre

Résolu
Bonjour,
j'ai un soucis avec une macro
Private Sub Worksheet_Change(ByVal zz As Range)
Dim c As Range
Application.EnableEvents = False
For Each c In zz
If Not Intersect(c, [C4:G39]) Is Nothing Then
c = UCase(c)
ElseIf Not Intersect(c, [AA4:AA39]) Is Nothing Then
c = Application.Proper(c)
End If
Next c
Application.EnableEvents = True
End Sub
qui formate en majuscule une plage C4:G39 en majuscule et colonne AA4:AA39
je voudrais ajouter une plage en majuscule [N4:O39]
comment s'y prendre j ai essayé de rajouter mais je tourne en rond
merci

1 réponse

  1. bonjour

    peut être ceci pour les deux plages en majuscule

    If Not Intersect(c, Union([C4:G39], [N4:O39])) Is Nothing Then

    bonne suite
    1. merci
      ça fonctionne impec
      a bientot