Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calculation Excel Sheet 1

Status
Not open for further replies.

mike101

Programmer
Jul 20, 2001
169
US
I have used my data to make a graph and a trendline. Excel has given me the equation in this format:
y = 2E-21x6 - 4E-18x5 - 1E-13x4 + 4E-10x3 + 2E-06x2 - 0.0094x + 10.275

I am trying to make this work in VBA format as a calculation where I can input x, and get the value of y. I don't understand how that math works (by the way the last number for each of those is an exponent, for example... 2E-21x^6) because I do not know what the E stands for or the - right in between, I've never seen this before. Can somebody translate this into a format so VBA can use it to calculate? Thank you.
 
Try this in VBA:
Function y(x As Double) As Double
y = (2E-21)*x^6 - (4E-18)*x^5 - (1E-13)*x^4 _
+ (4E-10)*x^3 + (2E-06)*x^2 - 0.0094*x + 10.275
End Function

Hope This Help, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top