Public Sub N1()
Dim x As Double, z As Double, y As Double
Dim a As Single, b As Single, c As Single
a = 7.57: b = 6.28: x = 3.14
y = (a + b) / (Sqr(Abs(Sin(x))))
z = Sin(y) + Exp(-x)
Debug.Print "y="; Format(y, "###0.000")
Debug.Print "z="; Format(z, "###0.000")
As matters of practice, I wouldn't give a procedure a name that looks like a cell reference, and absent a good reason, would declare all floating-point numbers as Doubles.
I've tried to use your code, but error didn't disappear.
I actually think the problem is not about the code. VBA on my home PC can't compile any macro I try to compile. It seems there is something wrong with Excel and VBA on my computer.
Anyway, thank you so much.