I know the angle is 90 degrees. and the formula to calculate the angle of vector A is inverse tan of (Ay / Ax), but Excel returns an error message because Ax is zero.

I know the angle is 90 degrees. and the formula to calculate the angle of vector A is inverse tan of (Ay / Ax), but Excel returns an error message because Ax is zero.

Ok, I got it figured out with a little help from Microsoft. For a vertical vector, Ax = 0, you can't use ATAN(Ay/Ax) to calculate the inverse tan, you have to use ATAN2(Ax, Ay) - the arguments are different. Thanks for responding.

Plotting the TAN function shows why there is a problem with ATAN.
However the nature of TAN=SIN/COS means that practical problems often come in the form Q=ATAN(X/Y).

By looking at the relative signs of X and Y (and watching for zeros at 90deg)
and using lots of IFs
A full 360deg solution can be derived.

Happily the ATAN2 function does all this for you...

I've found another way to go all around from -360 to 360 without using the Excel function ATAN2. Instead of ATAN2(x,y), I use ATAN(y / (sqrt(x^2+y^2) + x)) and multiply by 2 to get theta. This avoids the infinities.