Sub a() Dim ur As Long Dim car As String ur = 1 car = Left(Cells(ur, 1), 1) Do Until ur > 22 Select Case car '=================================================================== 'CREA 21 Case PER OGNI LETTERA '===================================================================== Case "a" Cells(ur, 1).Characters(1, 1).Font.ColorIndex = 3 ' modifica il ColorIndex End Select ur = ur + 1 Loop End Sub
Sub a() Dim ur As Long Dim car As String ur = 1 Do Until ur > 21 car = Left(Cells(ur, 1), 1) Select Case car '=================================================================== 'CREA 21 Case PER OGNI LETTERA '===================================================================== Case "a" Cells(ur, 1).Characters(1, 1).Font.ColorIndex = 3 ' modifica il ColorIndex Cells(ur, 1).Characters(1, 1).Font.Bold = True Cells(ur, 1).Interior.ColorIndex = 8 ' modifica il ColorIndex Case "b" Cells(ur, 1).Characters(1, 1).Font.ColorIndex = 25 ' modifica il ColorIndex Cells(ur, 1).Characters(1, 1).Font.Bold = True Cells(ur, 1).Interior.ColorIndex = 6 ' modifica il ColorIndex Case "c" Cells(ur, 1).Characters(1, 1).Font.ColorIndex = 21 ' modifica il ColorIndex Cells(ur, 1).Characters(1, 1).Font.Bold = True Cells(ur, 1).Interior.ColorIndex = 15 ' modifica il ColorIndex End Select ur = ur + 1 Loop End Sub
Cristian Ferrazzano, 06/08/2022 11:20:Salve, mi chiedevo se da un determinato elenco è possibile dividere le celle in base alla loro iniziale, o evidenziarle in base alla loro iniziale, ho provato con la formattazione condizionale ma se tipo indico le celle che iniziano con la P me ne se segnala un casino che iniziano con altre lettere