Extracting the first and second coefficient from equations

andreascostas

Board Regular
Joined
Jan 11, 2011
Messages
150
I am using =(left(C1,1)=”x”,1,0+(LEFT(C1,Find(“x”,C1)-1)) to extract the first coefficient from formulas. This works for the first and second equations but not the third.

- 9x - 9y = 54 yields -9


x + y = -4 yields 1

- x - 7y = -33 yields #value

How can I adjust that to work for all situations.

Also how do I extract the second coefficient of each equation, in a separate cell

Thanks
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
How exactly have you set this up?
Your formula has some issues the first is that is is missing a last ")", but even then the Excel translator reports some unidentified error.
 
Upvote 0
Assuming your first equation is in cell A1, put these formulas in the indicated cells and then copy them down to the end of your data...

B1: =0+(LEFT(SUBSTITUTE(" "&A1," x","1x"),FIND("x"," "&A1)-1))

C1: =0+MID(LEFT(SUBSTITUTE(A1," y","1y"),FIND("y ",A1)-1),FIND("x",A1)+2,99)
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top