Ciao a tutti,
E' possibile formattare una cella in modo che converta in maiuscolo delle lettere erroneamente scritte in minuscolo?
esempio op876/2022----------------->OP876/2022
Grazie
Moderatori: Anthony47, Flash30005
Private Sub Worksheet_Change(ByVal Target As Range)
Dim Area As String, inArea As Range, myC As Range
'
Area = "A2:C30" '<<< l'area da convertire in maiuscolo
Set inArea = Application.Intersect(Target, Range(Area))
If Not inArea Is Nothing Then
Application.EnableEvents = False
For Each myC In inArea
If myC.Value <> "" Then
myC.Value = UCase(myC.Value)
End If
Next myC
Application.EnableEvents = True
End If
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$B$7" Then Range("D7").ClearContents
If Target.Address = "$B$7" Then Range("F7").ClearContents
If Target.Address = "$B$7" Then Range("H7").ClearContents
If Target.Address = "$B$7" Then Range("B10").ClearContents
If Target.Address = "$B$7" Then Range("B10").ClearContents
If Target.Address = "$B$7" Then Range("D10").ClearContents
If Target.Address = "$B$7" Then Range("B13").ClearContents
If Target.Address = "$B$7" Then Range("F10:H13").ClearContents
If Target.Address = "$D$7" Then Range("F7").ClearContents
If Target.Address = "$D$7" Then Range("H7").ClearContents
If Target.Address = "$D$7" Then Range("B10").ClearContents
If Target.Address = "$D$7" Then Range("D10").ClearContents
If Target.Address = "$D$7" Then Range("B13").ClearContents
If Target.Address = "$B$4" Then Range("D4").ClearContents
If Target.Address = "$B$4" Then Range("F4").ClearContents
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$B$7" Then Range("D7").ClearContents
If Target.Address = "$B$7" Then Range("F7").ClearContents
If Target.Address = "$B$7" Then Range("H7").ClearContents
If Target.Address = "$B$7" Then Range("B10").ClearContents
If Target.Address = "$B$7" Then Range("B10").ClearContents
If Target.Address = "$B$7" Then Range("D10").ClearContents
If Target.Address = "$B$7" Then Range("B13").ClearContents
If Target.Address = "$B$7" Then Range("F10:H13").ClearContents
If Target.Address = "$D$7" Then Range("F7").ClearContents
If Target.Address = "$D$7" Then Range("H7").ClearContents
If Target.Address = "$D$7" Then Range("B10").ClearContents
If Target.Address = "$D$7" Then Range("D10").ClearContents
If Target.Address = "$D$7" Then Range("B13").ClearContents
If Target.Address = "$B$4" Then Range("D4").ClearContents
If Target.Address = "$B$4" Then Range("F4").ClearContents
Dim Area As String, inArea As Range, myC As Range
Area = "B7" '<<< l'area da convertire in maiuscolo
Set inArea = Application.Intersect(Target, Range(Area))
If Not inArea Is Nothing Then
Application.EnableEvents = False
For Each myC In inArea
If myC.Value <> "" Then
myC.Value = UCase(myC.Value)
End If
Next myC
Application.EnableEvents = True
End If
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
Dim Area As String, inArea As Range, myC As Range
'
Application.EnableEvents = False
If Target.Address = "$B$7" Then
Range("D7, F7, H7, B10, D10, B13, F10:H13").ClearContents
ElseIf Target.Address = "$D$7" Then
Range("F7, H7, B10, D10, B13").ClearContents
ElseIf Target.Address = "$B$4" Then
Range("D4,F4").ClearContents
End If
Application.EnableEvents = True
'
Area = "A2:C30" '<<< l'area da convertire in maiuscolo
Set inArea = Application.Intersect(Target, Range(Area))
If Not inArea Is Nothing Then
Application.EnableEvents = False
For Each myC In inArea
If myC.Value <> "" Then
myC.Value = UCase(myC.Value)
End If
Next myC
Application.EnableEvents = True
End If
End Sub
If Target.Address = "$B$7" Then Range("B10").ClearContents
Torna a Applicazioni Office Windows
Aggiornamento automatico intervallo grafici Autore: wallace&gromit |
Forum: Applicazioni Office Windows Risposte: 3 |
macro excel inserire caratteri nella cella e tutto maiuscolo Autore: turbonet |
Forum: Applicazioni Office Windows Risposte: 2 |
Filtro automatico non filtra più di un certo numero di righe Autore: Ricky0185 |
Forum: Applicazioni Office Windows Risposte: 2 |
Outlook: Salvare Allegati in PDF in automatico e rinominarli Autore: Making |
Forum: Applicazioni Office Windows Risposte: 11 |
Visitano il forum: Nessuno e 10 ospiti