Private Sub Command1_Click() Dim a As Variant Dim s1 As Integer, s2 As Integer Dim str As Variant a = Split(Text1.Text, vbCrLf) s1 = 0 s2 = 0 For Each str In a s1 = s1 + Val(Mid(Trim(str), 1, 1)) s2 = s2 + Val(Mid(Trim(str), 5, 1)) Next MsgBox s1 & " " & s2 End Sub