Math calculations

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!
 
R

roger

in the VBA references section, just add a reference to Excel, and use your
excel math

hth
 
M

Marshall Barton

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.
 
A

Ac

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!
 
A

Ac

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.
 
J

Jim Burke in Novi

This is being a bit picky, but pi is actually 3.14159265... - you skipped the
2, if it matters at all!
 
A

Ac

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!
 
M

Marshall Barton

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top