Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / October 2008

Tip: Looking for answers? Try searching our database.

T^2

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
jlute@marzetti.com - 05 Oct 2008 17:48 GMT
I'm trying to translate some Excel functions into an Access query but
I'm very ignorant regarding Excel functions and hope someone can
enlighten me!

The person who created the particular Excel functions used "T". Two
examples:

=0.5+0.001*T-0.0000005*T^2
=997.18+0.0031*T-0.0004*T*T

I've looked up T in the help file:
"Returns the text referred to by value."

Considering that the cells with the above functions are numeric as are
all of the cells on the sheet - what the heck are these functions
doing and why were they written this way?

Thanks in advance!
JLGWhiz - 05 Oct 2008 18:35 GMT
Te formulas that you posted appear to be simple mathematical equations where
T is a variable value.  Without seeing the full code set it would be
difficult to absolutely define T, but if you substitute any number for T in
the equations, you will get a numeric result.

> I'm trying to translate some Excel functions into an Access query but
> I'm very ignorant regarding Excel functions and hope someone can
[quoted text clipped - 14 lines]
>
> Thanks in advance!
jlute@marzetti.com - 08 Oct 2008 19:30 GMT
Thanks everybody! I realized the T "alias" shortly after I posted this
but poor internet connections prohibited my response.

I appreciate the info!

> Te formulas that you posted appear to be simple mathematical equations where
> T is a variable value.  Without seeing the full code set it would be
[quoted text clipped - 22 lines]
>
> - Show quoted text -
Dave Peterson - 05 Oct 2008 20:45 GMT
It looks as though the developer defined a name called T.
(Insert|Name|define in xl2003 menus).

You could go through that same menu to find out what T referred to--a cell, a
formula, a constant or whatever???

> I'm trying to translate some Excel functions into an Access query but
> I'm very ignorant regarding Excel functions and hope someone can
[quoted text clipped - 14 lines]
>
> Thanks in advance!

Signature

Dave Peterson

Chuck - 06 Oct 2008 06:48 GMT
>I'm trying to translate some Excel functions into an Access query but
>I'm very ignorant regarding Excel functions and hope someone can
[quoted text clipped - 14 lines]
>
>Thanks in advance!
In general those are equations for parabolas, but because of the constants they
are going to be very close to straight lines.  The equations would be written
exactly the same in Access.  T^2  = T*T = "T squared" or the number times
itself.  Generally in Excel and Access T^2 would be used.  Some programming
languages do not recognize the "^" symbol, in that case T*T would be used.
It's been a long time but I believe that VB6 does not recognize the ^ symbol.  

Chuck
--
Rick Rothstein - 06 Oct 2008 07:19 GMT
> It's been a long time but I believe that VB6 does not recognize the ^
> symbol.

Yes, VB6 does indeed recognize the power symbol.

Signature

Rick (MVP - Excel)

Chuck - 06 Oct 2008 16:01 GMT
>> It's been a long time but I believe that VB6 does not recognize the ^
>> symbol.
>
>Yes, VB6 does indeed recognize the power symbol.

You are absolutely correct.  I should have checked.  It was Turbo Pascal (DOS)
that did not use the ^ symbol.  I just checked.  
Pascal:     X^A    is written    exp(A*ln(X))
Rick Rothstein - 06 Oct 2008 16:43 GMT
It's been a (long, long) while since I looked at Turbo Pascal, but I thought
it used what Fortran (also been a long, long while since I looked at this
also) used for powers... the double asterisk symbol. I would have thought
your VB example of X^A would have been X**A in Turbo Pascal.

Signature

Rick (MVP - Excel)

>>> It's been a long time but I believe that VB6 does not recognize the ^
>>> symbol.
[quoted text clipped - 5 lines]
> that did not use the ^ symbol.  I just checked.
> Pascal:     X^A    is written    exp(A*ln(X))
Chuck - 07 Oct 2008 12:53 GMT
>It's been a (long, long) while since I looked at Turbo Pascal, but I thought
>it used what Fortran (also been a long, long while since I looked at this
>also) used for powers... the double asterisk symbol. I would have thought
>your VB example of X^A would have been X**A in Turbo Pascal.

It's possible.  I never tried that.  Would  "A"  have to be an integer?  What I
did  was to look at the source code for a program that I knew raised numbers to
non integer powers:  X^2.1342.  That program used the natural log function.  I
still think that some version of BASIC does not use ^.  Wasn't there a version
of BASIC that could compile the code to an .exe file?

Over time I wrote programs in 8 to 10 different versions of BASIC.  Programs
written in one version would not run in another.  The strangest case was when
we up graded a HP computer to the next model (like model 1 to model 2) and the
code written in the model 1 would not run in model 2.  It was usually a just
single command.  You just had to find what and where.
Rick Rothstein - 11 Oct 2008 15:56 GMT
It's been too long since I played with languages that used ** for powers,
but my recollection is that A could be a floating point value.

Signature

Rick (MVP - Excel)

>>It's been a (long, long) while since I looked at Turbo Pascal, but I
>>thought
[quoted text clipped - 21 lines]
> just
> single command.  You just had to find what and where.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.