kriege Fehlermeldung: Sub,Function oder Property erwartet. Warum? Öffne und schließe meine Function doch richtig, oder?
Function Ableitung(a)
Application.ThisWorkbook.Sheets("Tabelle1").Activate
'Bestimmen der Zellen
y2_hilf = 17 + 1
Text = "B" & y2_hilf
y1_hilf = 17 - 1
Text1 = "B" & y1_hilf
x2_hilf = 17 + 1
Text2 = "A" & x2_hilf
x1_hilf = 17 - 1
Text3 = "A" & x1_hilf
'Auslesen der Zellwerte
y2 = Range(Text).Value
y1 = Range(Text1).Value
x2 = Range(Text2).Value
x1 = Range(Text3).Value
'Berechnung der Steigung
m = (y2 - y1) / (x2 - x1)
Application.ThisWorkbook.Sheets("Tabelle2").Activate
b = Range("A1").Value
If m < 32 * b Then m
Else: m
End If
Ableitung = b
End Function
Danke Conny