LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default VBA coefficients of an equation

I am trying to write a VBA code to figure out the coefficients of an equation.

Y = A + B*X1 + C*X2 + D*X3

So if I have an equation of this form
Y = 2 + 3*X1 + 4*X2 + 5*X3 (values of X1, X2, X3 are known and so Y can be
calculated)

I want to know that A = 2, B = 3, C = 4 and D = 5

I can obtain the coefficient A by putting X1, X2, X3 = 0 and this would give
Y = 2 which is the value of A. I don't know how to find the other
coefficients.

If it is not possible to find the coefficients, how can I take the square of
each term in the equation.

Y = (2)^2 + (3*X1)^2 + (4*X2)^2 + (5*X3)^2


Just to sum up,
1) I want the user to enter a function in the form of Y = A + B*X1 + C*X2 +
D*X3
2) then the user will enter the values of X1, X2, X3 and this would enable
us to calculate Y
3) then we want to calculate Y1 = (B*X1)^2 + (C*X2) ^2 + (D*X3) ^2

PLEASE HELP IF YOU CAN€¦.

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Extracting Trendline Coefficients [email protected] Excel Discussion (Misc queries) 4 June 14th 07 05:57 PM
coefficients of polynomial Doublee Excel Discussion (Misc queries) 5 March 9th 07 05:55 PM
Trend Line Equation Coefficients Jake Excel Discussion (Misc queries) 4 April 17th 06 08:46 PM
Equation Editor- problem when editing an equation Gaby L. Excel Discussion (Misc queries) 0 September 27th 05 09:24 PM
Trendline coefficients MrUniverseman Charts and Charting in Excel 3 May 18th 05 12:56 PM


All times are GMT +1. The time now is 03:42 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"