Consider this formula, which sums the content of cells A6
in the worksheet range from RbStart
to RbEnd
.
=SUM(RbStart:RbEnd!A6)
Is there a way to make A6
dynamic in the sense that it takes the row number from the current cell's row? The reason is ask is that my first sheet is a sheet that consolidates a dynamic number of other sheets, located between RbStart
and RbEnd
(RbStart
and RbEnd
are just helper sheets to be able to include a dynamic number of sheets.)
The rows on the first sheet are dynamic. This is OK because Excel will automatically update the cell reference when you add additional rows. The problem is that for technical reasons during row generation we have blank rows in between, which are removed afterwards. But when you do that, Excel does not update the formula, so it goes out of sync with the dynamic sheets it sums.
You can simulate this as follows:
- Put my formula in cell
A6
. - Drag it down to copy. Note how in subsequent rows, it becomes
A7
,A8
,A9
,A10
, etc. - Now delete, say, row 9. Note how formula in row 9 no refers
A10
.
Since the same blank rows are deleted on the dynamic sheets, it now refers the wrong row. If I could somehow change the SUM formula such that instead of A6
it takes the row that the current cell is on, the problem would be solved.
I hope I am making sense. Happy to clarify.
indirect
formula support.office.com/en-us/article/… – user2023861