Formelumstellung
11.02.2007 21:02:51
Chantal
ich hätte da noch eine Frage,
wie kann ich die Berechnung in Zelle A18 ausgeben statt in einer MsBox?
Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$A$10" Then
Dim B As String
Dim i As Integer
Dim S As Long
Dim Summe As Long
With Sheets(1)
For i = 1 To Len(.Cells(10, 1))
B = Mid(.Cells(10, 1), i, 1)
For S = 1 To 26
If UCase(B) = UCase(.Cells(1, S)) Then Summe = Summe + .Cells(2, S)
Next S
For S = 1 To 11
If UCase(B) = UCase(.Cells(3, S)) Then Summe = Summe + .Cells(4, S)
Next S
Next i
End With
MsgBox Summe
End If
End Sub
Gruss
Chantal