AW: Plusvorzeichen sichtbar machen
nighty
hi droni :)
hab die formel jetzt angepasst und mehrmals getestet :)
ich brauch immer ein wenig laenger :))
gruss nighty
Function Sumtext(Zellen As Range, AnfangX As Long, EndeX As Long) As Double
Dim Zelle As Range
Dim zahl1
Dim zahl2
Application.Volatile
For Each Zelle In Zellen
If EndeX > Len(Zelle) Then EndeX = Len(Zelle)
If AnfangX < 1 Then AnfangX = 1
For zeich1 = AnfangX To EndeX
If Asc(Mid$(Zelle, zeich1, 1)) > 47 And Asc(Mid$(Zelle, zeich1, 1)) < 58 _
Or Asc(Mid$(Zelle, zeich1, 1)) = 44 Or Asc(Mid$(Zelle, zeich1, 1)) = 46 Then
zahl1 = zahl1 & Mid$(Zelle, zeich1, 1)
End If
Next zeich1
If zahl1 = "" Then zahl1 = "0"
zahl2 = zahl1 * 100
If Mid$(Zelle, 1, 1) <> "-" Then Sumtext = Sumtext + (zahl2 / 100)
If Mid$(Zelle, 1, 1) = "-" Then Sumtext = Sumtext - (zahl2 / 100)
zahl1 = ""
zahl2 = ""
Next
End Function