Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default Formula for x & y calculation

I need help building a formula to calculate both the "x" and "y" values for
the following equation:

x + y = 90
2.15x + 2.4y = 202.35

The solution would be x = 45 and y = 44, but I haven't found a formula that
work yet!
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,441
Default Formula for x & y calculation

KCarter,

Actually, the solution you give only applies to x + y = 89 ;-)

You need to learn to do matrix math.

So, enter your x coefficients in A1 and A2, your y coeff in B1 and B2, and your solution values in
C1 and C2:

1 1 89
2.15 2.4 202.35

Then select D1 AND D2, enter

=MMULT(MINVERSE(A1:B2),C1:C2)

and press Ctrl-Shift-Enter.

You will then get 45 and 44. If you had 90 in cell C1, you would get 54.6 and 35.4.

HTH,
Bernie
MS Excel MVP


"K. Carter" wrote in message
...
I need help building a formula to calculate both the "x" and "y" values for
the following equation:

x + y = 90
2.15x + 2.4y = 202.35

The solution would be x = 45 and y = 44, but I haven't found a formula that
work yet!



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,358
Default Formula for x & y calculation

The solution cannot be x=45 and y=44
Your first formula is x+y=90, and 45+44 < 90.
Solve your first formula for y. (y=90-x)
Plug in the 90-x into your second formula
2.15x+2.4(90-x)=202.35
Multiply 2.4 * (90-x)
2.15x+216-2.4x=202.35
Add 2.15x and -2.4x and subtract 216 from both sides
-.25x=202.35-216 (-13.65)
Solve for x
x=-13.65/-.25 = 54.6
Solve for y
y=90-54.6=35.4



--
John C


"K. Carter" wrote:

I need help building a formula to calculate both the "x" and "y" values for
the following equation:

x + y = 90
2.15x + 2.4y = 202.35

The solution would be x = 45 and y = 44, but I haven't found a formula that
work yet!

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,393
Default Formula for x & y calculation

If the math in the two very good answers is beyond you, then send me private
email and I will show you how to use Solver for this type of problem
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"K. Carter" wrote in message
...
I need help building a formula to calculate both the "x" and "y" values for
the following equation:

x + y = 90
2.15x + 2.4y = 202.35

The solution would be x = 45 and y = 44, but I haven't found a formula
that
work yet!



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default Formula for x & y calculation

Thanks ever so much Bernie.....John's reply works as well but yours is much
faster and will save me a tremendous amount of time! Much appreciated!!! (I
will add matrix math to my list of things to learn - just learning the term
was my "something new" for today).

tks....Kim

"Bernie Deitrick" wrote:

KCarter,

Actually, the solution you give only applies to x + y = 89 ;-)

You need to learn to do matrix math.

So, enter your x coefficients in A1 and A2, your y coeff in B1 and B2, and your solution values in
C1 and C2:

1 1 89
2.15 2.4 202.35

Then select D1 AND D2, enter

=MMULT(MINVERSE(A1:B2),C1:C2)

and press Ctrl-Shift-Enter.

You will then get 45 and 44. If you had 90 in cell C1, you would get 54.6 and 35.4.

HTH,
Bernie
MS Excel MVP


"K. Carter" wrote in message
...
I need help building a formula to calculate both the "x" and "y" values for
the following equation:

x + y = 90
2.15x + 2.4y = 202.35

The solution would be x = 45 and y = 44, but I haven't found a formula that
work yet!






  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,441
Default Formula for x & y calculation

Kim,

And note that you are not limited to two equations with two unknowns - this technique works for
higher order systems of equations, which are much harder to solve manually.

HTH,
Bernie
MS Excel MVP


"K. Carter" wrote in message
...
Thanks ever so much Bernie.....John's reply works as well but yours is much
faster and will save me a tremendous amount of time! Much appreciated!!! (I
will add matrix math to my list of things to learn - just learning the term
was my "something new" for today).

tks....Kim

"Bernie Deitrick" wrote:

KCarter,

Actually, the solution you give only applies to x + y = 89 ;-)

You need to learn to do matrix math.

So, enter your x coefficients in A1 and A2, your y coeff in B1 and B2, and your solution values
in
C1 and C2:

1 1 89
2.15 2.4 202.35

Then select D1 AND D2, enter

=MMULT(MINVERSE(A1:B2),C1:C2)

and press Ctrl-Shift-Enter.

You will then get 45 and 44. If you had 90 in cell C1, you would get 54.6 and 35.4.

HTH,
Bernie
MS Excel MVP


"K. Carter" wrote in message
...
I need help building a formula to calculate both the "x" and "y" values for
the following equation:

x + y = 90
2.15x + 2.4y = 202.35

The solution would be x = 45 and y = 44, but I haven't found a formula that
work yet!






Reply
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
Calculation formula Glenn Excel Worksheet Functions 0 May 15th 08 05:16 AM
XL calculation formula Learning Excel Excel Discussion (Misc queries) 4 January 23rd 08 06:39 PM
formula calculation barry28 Excel Worksheet Functions 4 June 4th 07 01:56 PM
Changes to Calculation Formula Zygy New Users to Excel 2 October 16th 06 01:23 PM
formula calculation Excel GuRu Excel Discussion (Misc queries) 4 March 21st 06 01:56 PM


All times are GMT +1. The time now is 10:11 AM.

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

About Us

"It's about Microsoft Excel"