I am able to do this easily in Excel, but my dataset has gotten too large. In excel, I would use solver.
Column A,B,C,D = random numbers
Column E = random
This may not be the easiest way first time thru, but I wrote a function which uses the package BB
to back-solve systems of equations. You can download it: http://home.comcast.net/~cgwcgw/ktsolve.R .
Of course comcast's home pages are long gone. Go get the "ktsolve" package at CRAN
There's reasonably comprehensible documentation in the comments at the top of the source file. Basically, you create a function whose outputs are the results of all your equations, feed ktsolve
a set of "knowns" and a list of the variables which are 'unknowns,' and rather like the commercial app "TK!Solver" it finds the answers for you.
If you do decide to try this out, feel free to email me for help in using it.