Implement Excel2k formula in Access2k Expression Builder

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Could someone please take a look at this formula that works perfectly fine in
excel2k but wont perform in access2k expression builder.

dir: IF(And([y]>0,
[x]>0),180+ATAN([y]/[x])*180/(3.14159265),IF(AND([y]>0,[x]<0),180+ATAN(-[y]/[x])*180/(3.14159265),IF(AND([y]=0,[x]>0),90,IF(AND([y]<0,[X]>0),
ATAN(-[y]/[x])*180/(3.14159265),IF(AND([y]<0,[x]<0)ATAN([y]/[x])*180/(3.14159265)+180,IF([y]<0,[x]=0)270,IF(ANd([y]=0,[x]<0),180,0))))))

thanks
 
Hi Kevin,
Many built-in functions in Access have different names from their Excel
equivalents. Don't ask me why.

if becomes iif
atan becomes atn
and doesn't exist, but could be done by nesting iif functions

It gets very horrible, very quickly, so I would usually break an expression
like this up into intermediate fields.

Good luck
Roger
 
Back
Top