Hi,
I need a write a VB code of SECH(x) function using macros. There should be only one function.

This is what I have so far:
Sub MySub()
Range("B2") = y
End Sub

Function sech(x)
sech = 2 / (Exp(u) + Exp(-u))
y = sech
End Function

I'm new to programming excel so I have no idea what I am doing, but when I run the program, on the worksheet, it just says ######.
What am I doing wrong?