This seems like a problem that could be solved using linear programming using an built-in script that ships with Excel called Solver. I would google "linear programming with excel" or "excel solver" more more information on this topic.
Below is how I would set up the excel spreadsheet. After you set the constraints, and cells to adjust, solver/excel should then be able to come up with two lists that fit your requirements.
The constraint D2 : D26 = F2:F26 is to assure that every number is used once.
Excel/Solver will place 1s and 0s in the cells B2:C26 until the constraints of G27=G29 and H27=H29 are satisified.
*Be sure to add a Binary constraint on cells B2:C26
If you want to give the program some leeway you could always specify some range for your constraints having something like G27 >= 90000000 AND G27 <= 95000000 (and so forth for H27) and solve that way.
Again though, I would search google for more information regarding this subject as I haven't really used solver for several years. I am quite confident this problem can be solved in this fashion though as we tackled far more complex problems in the class I took.
Jam it back in, in the dark.