PC Review


Reply
Thread Tools Rate Thread

Math calculations

 
 
Ac
Guest
Posts: n/a
 
      9th Jul 2008
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!

 
Reply With Quote
 
 
 
 
roger
Guest
Posts: n/a
 
      9th Jul 2008
in the VBA references section, just add a reference to Excel, and use your
excel math

hth


"Ac" wrote:

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

 
Reply With Quote
 
Marshall Barton
Guest
Posts: n/a
 
      9th Jul 2008
Ac wrote:

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

--
Marsh
MVP [MS Access]
 
Reply With Quote
 
Ac
Guest
Posts: n/a
 
      9th Jul 2008
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!


"roger" wrote:

> in the VBA references section, just add a reference to Excel, and use your
> excel math
>
> hth
>
>
> "Ac" wrote:
>
> > 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!
> >

 
Reply With Quote
 
Ac
Guest
Posts: n/a
 
      9th Jul 2008
Thanks! I will try.

"Marshall Barton" wrote:

> Ac wrote:
>
> >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.
>
> --
> Marsh
> MVP [MS Access]
>

 
Reply With Quote
 
Jim Burke in Novi
Guest
Posts: n/a
 
      9th Jul 2008
This is being a bit picky, but pi is actually 3.14159265... - you skipped the
2, if it matters at all!

"Ac" wrote:

> Thanks! I will try.
>
> "Marshall Barton" wrote:
>
> > Ac wrote:
> >
> > >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.
> >
> > --
> > Marsh
> > MVP [MS Access]
> >

 
Reply With Quote
 
Ac
Guest
Posts: n/a
 
      9th Jul 2008
I appreciate your information. The 2 is matter for this calculation. Thanks!


"Jim Burke in Novi" wrote:

> This is being a bit picky, but pi is actually 3.14159265... - you skipped the
> 2, if it matters at all!
>
> "Ac" wrote:
>
> > Thanks! I will try.
> >
> > "Marshall Barton" wrote:
> >
> > > Ac wrote:
> > >
> > > >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.
> > >
> > > --
> > > Marsh
> > > MVP [MS Access]
> > >

 
Reply With Quote
 
Ac
Guest
Posts: n/a
 
      9th Jul 2008
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!


"Marshall Barton" wrote:

> Ac wrote:
>
> >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.
>
> --
> Marsh
> MVP [MS Access]
>

 
Reply With Quote
 
Marshall Barton
Guest
Posts: n/a
 
      10th Jul 2008
Good catch.

Proves once again that everything must be double checked,
--
Marsh
MVP [MS Access]


Jim Burke in Novi wrote:

>This is being a bit picky, but pi is actually 3.14159265... - you skipped the
>2, if it matters at all!
>
>"Ac" wrote:
>
>> Thanks! I will try.
>>
>> "Marshall Barton" wrote:
>>
>> > Ac wrote:
>> >
>> > >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.
>> >
>> > --
>> > Marsh
>> > MVP [MS Access]
>> >


 
Reply With Quote
 
Marshall Barton
Guest
Posts: n/a
 
      10th Jul 2008
Ac wrote:
>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.

--
Marsh
MVP [MS Access]
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Math calculations in VBA =?Utf-8?B?RXJpYw==?= Microsoft Excel Programming 8 30th Mar 2009 12:42 AM
Math Calculations =?Utf-8?B?S2V5Ym9hcmQ=?= Microsoft Access 1 10th Jan 2007 04:24 AM
Textbox & Math Calculations RobRich Microsoft C# .NET 2 2nd Nov 2004 07:23 AM
Using the result of date math in regular calculations Tony Olson Microsoft Excel Discussion 1 15th Oct 2004 05:20 PM
Math Calculations =?Utf-8?B?SkFC?= Microsoft Frontpage 1 8th Dec 2003 09:02 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:47 PM.