Page 1 of 1

Excel Programming

Posted: Mon Nov 07, 2005 11:34 am
by Vercz
[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, [url=\"http://vercz.killanet.net/Equation-vercoe.xls\"]here[/url] 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

Posted: Mon Nov 07, 2005 8:14 pm
by Scott
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?

Excel Programming

Posted: Mon Nov 07, 2005 9:30 pm
by Vercz
[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... [code]=SUM(LEFT($B$3, SUM(FIND("x",$B$3,1) - 1)) * A5 + RIGHT($B$3, SUM(LEN($B$3) - FIND("+",$B$3,1))))[/code] [/color]

Excel Programming

Posted: Mon Nov 07, 2005 9:37 pm
by Scott
You\'re trying to solve x putting that equation in, yes?

Excel Programming

Posted: Mon Nov 07, 2005 9:45 pm
by Vercz
[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

Posted: Mon Nov 07, 2005 9:47 pm
by Scott
Still confused, but glad you got it sorted <img src=\'http://www.killanet.net/forum3/public/s ... >/good.gif\' class=\'bbc_emoticon\' alt=\'(Y)\' />

Excel Programming

Posted: Mon Nov 07, 2005 10:11 pm
by Shydragonchic
<img src=\'http://www.killanet.net/forum3/public/s ... /blink.gif\' class=\'bbc_emoticon\' alt=\':blink:\' />

Excel Programming

Posted: Tue Nov 08, 2005 12:27 am
by radar
If I didn't do Excel in Cert 4, I would have about as much clue as our lost dragon.