I have a workbook with 2 sheets estimate and data sheet summary.
In estimate sheets there is a value at cell R2 29828
In data sheet summary column E are cells rounded amount still to last row before sum which equals 29830.
The data is dynamic on both sheets but value at R2 data is entered manually as a counter check .
Am looking a vba code that can adjust at random any value of columns E so that the total equals 29828 which is must be equal to that of cell R2 of estimate sheet.
Note as example that if cell R2 of estimate sheet is 30546 and the total on Summary data sheet is 30543 then it should adjust at random any value of column E but however
the value should be adjusted by 1 or -1 by cell of column E meaning that if there is a difference of -3 or 3 , then a random cell should be adjusted by 1 number
only , that is it cannot adjust a cell value E4 FROM 10 to 7 OR 10 TO 13.
The difference should always adjust whether by 1 value per cell not a cell be adjusted by 3 value directly
Note the data is dynamic there may be 100 or 3000 rows before summing data summary sheet .
Bookmarks