Sub a()
Dim Pl As Range, c As Range, s, i&
Set Pl = Range("A1:B29")
For Each c In Pl
s = Split(Application.WorksheetFunction.Trim(c))
s(0) = UCase(s(0))
For i = LBound(s) + 1 To UBound(s)
s(i) = LCase(s(i))
Next i
c = Join(s, " ")
Next
End Sub
je voudrai par une macro mettre le premier mot de ma colonne en majuscule et et les autres en minuscule.
Sub a()
Dim Pl As Range, c As Range, maj, min As String
Set Pl = Range("A1:B29")
For Each c In Pl
maj = UCase(Split(Application.WorksheetFunction.Trim(c))(0))
min = LCase(Mid(c, Len(maj) + 2, Len(c)))
c = maj & " " & min
Next
End Sub