Dear experts,

I have a question. I need a formula in excel to calculate following :

Say I have a matrix in excel 4 rows, 3 columns :

8 5 6 19 4 7 2 13 3 1 4 8 2 3 1 7 17 16 14 47

- values in red are totals (column & row)

- green value = grand total

Now we do a reorganisation of the row totals to :

Total row 1 = 15

Total row 2 = 11

Total row 3 = 12

Total row 4 = 9

Grand total remains 47

Column totals (17, 16, 14) are FIXED too

The formula is to recalculate (pro rata) the matrix values in order that the row totals become as set above (15, 11, 12, 9),

and the column totals remain equally (17, 16, 14).

Can somebody help me for this formula ?

Thank you very much,

Roskammer