How can i translate a ATAN2 formule form EXCEL to ACCES?
=ALS(F2>0;GRADEN(BOOGTAN2(E2;F2));360+GRADEN(BOOGT AN2(E2;F2)))
Is it possible to translate it in a Access table calcultion field?
Greetings Ed
How can i translate a ATAN2 formule form EXCEL to ACCES?
=ALS(F2>0;GRADEN(BOOGTAN2(E2;F2));360+GRADEN(BOOGT AN2(E2;F2)))
Is it possible to translate it in a Access table calcultion field?
Greetings Ed
First, calculated table fields should be avoided because calculations should not be stored as a general rule, rather they are calculated when needed. Second, calculated table fields have minimal options and they don't even come close for your request. I have used Excel functions in Access by setting a reference to Excel but I can't recall which one(s) that I was using. Just saying that may be an option. Where you have BOOGTAN2 - that is an untranslated word for ATAN2?
You might need to post this in an Excel forum that also supports Access users if a reference to Excel from your Access vba code project doesn't help.
Please follow cross posting etiquette guidelines (provide links to the other site(s) ) if you do.
EDIT - There is a list of built in Access functions here (scroll down for math)
https://support.microsoft.com/en-us/...2-658ce330ed83
It's a far shorter list than Excel math functions.
The more we hear silence, the more we begin to think about our value in this universe.
Paraphrase of Professor Brian Cox.
I have no idea what that Excel formula means
However, I have a number of trig functions including this for getting the arctangent of 2 values.
Its several years since I used it & please don't ask me to explain it!
For example:Code:Public Function Atn2(Y As Double, X As Double) As Double 'Arctangent of 2 values (e.g. lat/long) If X > 0 Then Atn2 = Atn(Y / X) ElseIf X < 0 Then Atn2 = Sgn(Y) * (Pi - Atn(Abs(Y / X))) ElseIf Y = 0 Then Atn2 = 0 Else Atn2 = Sgn(Y) * Pi / 2 End If End Function
?Atn2(54.1245,-2.162)
1.61072004350471
Compare what you get in Excel with that function in Access.
Any use?
And that works provided you have a reference to Excel (you didn't state that is was a requirement)?
With such a reference, I tested a simple attempt to call an Excel built in function with
I got a result over 1.1 but it means nothing to me.Code:Dim result as Double result = Excel.Application.WorksheetFunction.Atan2(1, 2) MsgBox result
The more we hear silence, the more we begin to think about our value in this universe.
Paraphrase of Professor Brian Cox.