Currently I use Solver to do calculations and then post the result myself. Can I set up some VBA code to do 3 things (look, calculate and post)? I have looked and looked on the net for a solution and nothing. I have a lot of these to do (I have attached a very small sample spreadsheet) so a VBA program would be a real time saver. Any input/comments would be appreciated.

[ATTACH=JSON]{"data-align":"none","data-size":"full","title":"EXCEL SHEET SOLVER.xlsx","data-attachmentid":1208518}[/ATTACH]

First, I would need code to search and determine if there are any numbers in the following cells: D24,F24,H24,J24,L24. If any, I need the program to do a calculation, for each cell, using Solver and then enter the answer in the appropriate cell by referencing the cell above it. Using my example of cell I24 with 7.77 in it (I hope my description of the calculation below is okay, if not please advise) I would need a macro to do the calculation which is as follows:

Cell A23 = 2

Cell B42 = A23+7.77 (7.77 have to be entered by macro)

Cell C23 = A23/2*B5 (B5 have to entered by macro. Cell L23 with 5 in it gets used to refer to cell A5 and use the adjacent cell B5 number of 12.00)

Solver – Set Target cell: $A$1

Equal To: Min Value of: 0

By changing cell $A$23

Subject to the constraints $B$23 = $C$23

Answer: 1.55

The code would then have to search and determine where the 5 (cell L23) gets used as a reference number to refer to any cell within the range of E1:E20,H1:H20 with a 5 found and has a number in the adjacent cell to the right. The 1.55 would be placed in cell J12 and added to the amount in cell I12 (original figure was 7.77 + 1.55 = 9.32).

After each calculation all cells D24,F24,H24,J24,L24 would be blank.

Thank-you for all your help.

[ATTACH=JSON]{"data-align":"none","data-size":"full","title":"excel spread.jpeg","data-attachmentid":1208519}[/ATTACH]