Vedi questo. strSorgente è la stringa di partenza. Il ciclo for legge tutti i caratteri e mette i numeri in strNumeri ed il resto dei caratteri in strLettere. Ciao Dim strSorgente As String Dim strNumeri As String Dim strLettere As String Dim char As String strSorgente = "A97D349H9" For i = 1 To Len(strSorgente) char = Mid$(strSorgente, i, 1) If Isnumeric(char) Then strNumeri = strNumeri + char Else strLettere = strLettere + char End If Next If Len(strNumeri) > 0 Then Msgbox "Numeri: " + Join(Evaluate(|@Newline|)) + strNumeri End If If Len(strLettere) > 0 Then Msgbox "Lettere: " + Join(Evaluate(|@Newline|)) + strLettere End If
Massimo Nadalin | Devangarde
|