Math calculations

  • Thread starter Thread starter Ac
  • Start date Start date
A

Ac

Hi,

We have an Excel calculation sheet to process the calculation for the
current project; it is not user friendly now. I try to create interface let
user input the required data, and use the queries to do the calculation. Some
of the equations in the excel sheet like:

1. A= (((PI()/4)*($F$85^2))*12)/231/42
2.B=
SQRT(($F$65^2)*(EXP($F$71))+((15*($F$30^2)*$F$56*$F$69*$F$66*$F$5*(EXP($F$73)-1))/($F$73*(((($F$11-$F$17)^5+2.764^5))))))
3. C=
(((70)*($F$29^0.18)*($F$28^0.82)*($F$94^1.84))/($F$85^4.92))*($F$83/1000)

Is that possible that Access can handle this calculation? What are the
symbols for PI (3.14159...) and SQRT in the Access?

I appreciate for your help!
 
in the VBA references section, just add a reference to Excel, and use your
excel math

hth
 
Ac said:
Hi,

We have an Excel calculation sheet to process the calculation for the
current project; it is not user friendly now. I try to create interface let
user input the required data, and use the queries to do the calculation. Some
of the equations in the excel sheet like:

1. A= (((PI()/4)*($F$85^2))*12)/231/42
2.B=
SQRT(($F$65^2)*(EXP($F$71))+((15*($F$30^2)*$F$56*$F$69*$F$66*$F$5*(EXP($F$73)-1))/($F$73*(((($F$11-$F$17)^5+2.764^5))))))
3. C=
(((70)*($F$29^0.18)*($F$28^0.82)*($F$94^1.84))/($F$85^4.92))*($F$83/1000)

Is that possible that Access can handle this calculation? What are the
symbols for PI (3.14159...) and SQRT in the Access?


A usually good enough symbol for PI is 3.1415965

The sybor for EXP is Exp

The symbol for SQRT is SQR

You will also have to replace all the cell references with
field names.
 
Thank you for your reply.
in the VBA references section, just add a reference to Excel

Where is the VBA reference section and how do I add a reference to Excel?

Thanks again!
 
Thanks! I will try.

Marshall Barton said:
A usually good enough symbol for PI is 3.1415965

The sybor for EXP is Exp

The symbol for SQRT is SQR

You will also have to replace all the cell references with
field names.
 
This is being a bit picky, but pi is actually 3.14159265... - you skipped the
2, if it matters at all!
 
Hi Marshall,

I have one more question, what is the symbol for log base 10. Here is the
Excel equation: D= =-0.8+(2*(LOG10(F36*(SQRT(1*InputData!E29)))))

Thanks!
 
Ac said:
I have one more question, what is the symbol for log base 10. Here is the
Excel equation: D= =-0.8+(2*(LOG10(F36*(SQRT(1*InputData!E29)))))


Log10(X) = Log(X) / Log(10)

So, assuming no more typos, you could use:

=-0.8+(2*(LOG(F36*(SQRT(1*InputData!E29)))/Log(10)))

Or you caould create a Public function in a standard module:

Public Function LOG10(X As Double) As Double
On Error GoTo LogError
LOG10 = Log(X) / Log(10)
AllDone:
Exit Function

LogError:
MsgBox Err.Number & Err.Descripition & vbNewLine & "X=" &
X
Resume AllDone
End Function

This way your existing expression would not have to be
changed.
 
Back
Top