[color=\"green\"]ok, i got bored and i know ive taken this a little too far but hey, its for extra credit in my maths class, that cant be a bad thing right?
ok, i started off by making a simple excel sheet that calculated simple linear equations \"2x+4\" using the whole LHS = equation, RHS = answer, and gave you a list of what x could possibly be, then you check that against the RHS bit.. and voila
then i got lazy, so i started making it more automated, so instead of editing the formula each time for different equations, it picked up on it itself... i got that part fine, as long as the \"a\" and \"b\" parts to the \"ax+b\" equation were single digits, this is where it gets hard... and this is where i need help
the main problem im having, is that Excel is reading numbers, AS TEXT!!! <img src=\'http://www.killanet.net/forum3/public/s ... #>/cry.gif\' class=\'bbc_emoticon\' alt=\':(\' /> could the formula be throwing it off? i dunno...
all im trying to do is be able to input an equation, and have it output an answer. i want to be able to input the following examples: 1x+1, 1x+10, 10x+1, 10x+10. comprende?
finally, here is the sheet ive been working on, to the right you see where i have each section of code working itself out, with the text for the code on top, actual code result below <img src=\'http://www.killanet.net/forum3/public/s ... /smile.gif\' class=\'bbc_emoticon\' alt=\':)\' />
thanks for all the help, i just cant work it out.... NUMBERS != TEXT (unless they do, and someone hasn\'t told me, in which case... please do kthxbye)
PS. The formula i want fixed are the ones from B5 - B24
edit: apparently i cant attach .xls sheets[/color]
Excel Programming
Moderators: Moderator, Global Moderator
Excel Programming
Ok, you\'re confusing the hell outta me. Are you trying to solve to get x? Eg 2x + 30 = 0 therefore x = 15? Are all the equations ax + 10, or should the spreadsheet have a column to let you input b? Will it always only be used for linear equations, or will you want to add more complicated ones?
Last edited by Scott on Mon Nov 07, 2005 9:36 pm, edited 1 time in total.
Excel Programming
[color=\"green\"]no, just linear... but i want it to pick up on how many characters are in the equation, so it does 1x+1, 1x+10, 10x+1, 10x+10 ... follow?
ooh, nevermind, got it working using... [/color]
ooh, nevermind, got it working using...
Code: Select all
=SUM(LEFT($B$3, SUM(FIND("x",$B$3,1) - 1)) * A5 + RIGHT($B$3, SUM(LEN($B$3) - FIND("+",$B$3,1))))
Last edited by Vercz on Mon Nov 07, 2005 9:43 pm, edited 1 time in total.
Excel Programming
[color=\"green\"]its ok, i know it was really hard to explain/understand.. its ok though, ive got it working to what i want <img src=\'http://www.killanet.net/forum3/public/s ... /smile.gif\' class=\'bbc_emoticon\' alt=\':)\' /> [/color]
Excel Programming
Still confused, but glad you got it sorted <img src=\'http://www.killanet.net/forum3/public/s ... >/good.gif\' class=\'bbc_emoticon\' alt=\'(Y)\' />
-
Shydragonchic
- Global Moderator

- Posts: 0
- Joined: Sun May 16, 2004 4:42 pm
Excel Programming
<img src=\'http://www.killanet.net/forum3/public/s ... /blink.gif\' class=\'bbc_emoticon\' alt=\':blink:\' />
Excel Programming
If I didn't do Excel in Cert 4, I would have about as much clue as our lost dragon.




