A voir également:
- Saisie majuscules-minuscules automatique
- Réponse automatique thunderbird - Guide
- Saisie gestuelle iphone - Guide
- Recherche automatique des chaînes ne fonctionne pas - Guide
- Logiciel de sauvegarde automatique gratuit - Guide
- Saisie automatique - Guide
4 réponses
Bonjour,
Une macro devrait pouvoir t’aider :
par exemple dans Feuil1 :
Le texte en A1 sera automatiquement transformé en majuscule.
LCase tranformera en minuscule.
Une macro devrait pouvoir t’aider :
par exemple dans Feuil1 :
Private Sub Worksheet_SelectionChange(ByVal Target As Range) Cells(1, 1).Value = UCase(Cells(1, 1)) End Sub
Le texte en A1 sera automatiquement transformé en majuscule.
LCase tranformera en minuscule.
Bonjour Feanerys, Dididonf
Comment veux tu qu'Excel sache ce que tu veux faire ? il faut bien que tu lui transmettes ton ordre
Comment veux tu qu'Excel sache ce que tu veux faire ? il faut bien que tu lui transmettes ton ordre
Bonjour à tous,
Un code à adapter
Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False 'pour éviter de relancer alors qu'on modifie
' première lettre en majuscule
If Target.Address = "$J$14" Then [J14] = LCase([J14]): GoTo fin
If Target.Address = "$A$30" Then Target = Application.Proper(Target): GoTo fin
If Target.Address = "$A$35" Then Target = Application.Proper(Target): GoTo fin
If Target.Address = "$A$38" Then Target = Application.Proper(Target): GoTo fin
If Target.Address = "$G$25" Then Target = Application.Proper(Target): GoTo fin
If Target.Address = "$K$4" Then Target = Application.Proper(Target): GoTo fin
If Target.Address = "$K$7" Then Target = Application.Proper(Target): GoTo fin
If Target.Address = "$K$50" Then Target = Application.Proper(Target): GoTo fin
If Target.Address = "$K$53" Then Target = Application.Proper(Target): GoTo fin
If Target.Address = "$S$22" Then Target = Application.Proper(Target): GoTo fin
If Target.Address = "$S$10" Then Target = Application.Proper(Target): GoTo fin
If Target.Address = "$S$19" Then Target = Application.Proper(Target): GoTo fin
' tout en majuscule
Select Case Target.Address(0, 0)
Case "A4, K4"
Target.Value = UCase(Target.Text) 'j'utilise la propriété text
End Select
fin:
Application.EnableEvents = True 'on remet
If IsEmpty(Range("Y47")) Then
Range("Y47").Value = Date
End If
End Sub
Un code à adapter
Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False 'pour éviter de relancer alors qu'on modifie
' première lettre en majuscule
If Target.Address = "$J$14" Then [J14] = LCase([J14]): GoTo fin
If Target.Address = "$A$30" Then Target = Application.Proper(Target): GoTo fin
If Target.Address = "$A$35" Then Target = Application.Proper(Target): GoTo fin
If Target.Address = "$A$38" Then Target = Application.Proper(Target): GoTo fin
If Target.Address = "$G$25" Then Target = Application.Proper(Target): GoTo fin
If Target.Address = "$K$4" Then Target = Application.Proper(Target): GoTo fin
If Target.Address = "$K$7" Then Target = Application.Proper(Target): GoTo fin
If Target.Address = "$K$50" Then Target = Application.Proper(Target): GoTo fin
If Target.Address = "$K$53" Then Target = Application.Proper(Target): GoTo fin
If Target.Address = "$S$22" Then Target = Application.Proper(Target): GoTo fin
If Target.Address = "$S$10" Then Target = Application.Proper(Target): GoTo fin
If Target.Address = "$S$19" Then Target = Application.Proper(Target): GoTo fin
' tout en majuscule
Select Case Target.Address(0, 0)
Case "A4, K4"
Target.Value = UCase(Target.Text) 'j'utilise la propriété text
End Select
fin:
Application.EnableEvents = True 'on remet
If IsEmpty(Range("Y47")) Then
Range("Y47").Value = Date
End If
End Sub
Pardon mais je ne sais pas du tout où aller ? Dois rentrer : Private Sub wor... dans la cellule ?
Dois-je appuyer sur l'onglet macro j'ai vu qu'il y en avait un.
Je suis novice dans excel. Pourrais-je avoir un peu plus d'explications svp. :) excusez-moi.
Tu colle le code dans la zone blanche en dessous.
Dans le code, cells(1,1) correspond à la cellule A1, tu peux adapter : cells(1,2) correspond à B1
et pour compléter la réponse dedidibonf mettre la 1ère lettre d'un mot en majuscule:
https://www.excel-easy.com/vba/examples/convert-to-proper-case.html
@+ Le Pivert
Je n'y arrive pas j'ai trouvé VBA mais j'ai pas comme vous dîtes, je suis sur mac.