Updating formulas for future rows
i have a formula that i may need to change the ranges within the formula on occasion, without affecting results for previous rows
a simple example is
=C5*P$3-F5+N4, where c5 is in the current row, but P$3 needs to be changed to an updated value obviously if i change the value in p3 then all previous results are also changed
the cells needs to be updated to the bottom of the sheet, but some rows contain subtotals so i can't just drag the updated formula to the bottom of the usedrange
also subtotal rows need to be skipped where N4 above is the previous row, at subtotals needs to be 1 or 2 rows above the previous row
the most complicated example is
=ROUND((SUMPRODUCT(--(J5*52>tt!A$5:A$8 ), J5*52-(tt!A$5:A$8),tt!B$5:B$8-tt!B$4:B$7))/52+J5*tt!$D$5+0.49,0)
where all the same conditions apply, though no cumulative totals are required
i have successfully converted this formula to use a named range for tt sheet ranges, but again updating the named range either by value or name will change previous result
i am looking for some simple method for any update required
i have been considering a vba solution, but thought i would post here first to see if anyone has a better method
Re: Updating formulas for future rows
i think i have solved this with a vba code
but now the whole problem has become irrelevant, as the spreadsheet will probably be obsolete in a short time, and only kept for history
how things change when you turn away for a few moments
Re: Updating formulas for future rows
Quote:
i think i have solved this with a vba code
AMEN to VBA, i personally never bothered with formulas for this exact reason, they work for basic home finance level calculations but the level of complexity with formulas just seems to exponentially grow when you add a simple level of complexity to it.
Its great to find a solution using a tool that simply put is mediocre at best and gives you a sense of achievement but at the end of the day... why bother. your a programmer, why recreat the wheel when you can create a UFO.
Re: Updating formulas for future rows
Quote:
why bother. your a programmer, why recreat the wheel
most code i write is just to add a missing functionality to someoneelses commercial program, very simple stuff mostly
the above spreadsheet was created by a friend, i have been updating it regularly for a few years, but now its days are numbered
Re: Updating formulas for future rows
Enter this formula: =SUM(INDIRECT("D2:D"&ROW()-1)) (D2 is the first cell in the list that you want to sum) at the end of the cells that you want to sum the number list, and press Enter key. Tips: The formula only work correctly when you place it at the end of the data list.