Peter Bartholomew
Well-Known Member
The assumption is that you need to work on a workbook that has repeating blocks of data of varying length. The start of each block is marked, in general by an Order Number or Project Code or some such. In the attached Office 2016 workbook I have used the presence of a 1 in a
The objective is to create a range name 'block' that is defined relative to the cell that references it and starts with the preceding marker and ends with the row before the next marker. Thus, in the example, = SUM(block value) will only sum of values occurring within the current block irrespective of the cell actually chosen for the formula.
The use case for such would be to allow a layout and analysis that applies to a single instance of an activity to be reused for an arbitrary number of instances with minimal modification. My solution, based upon the use of MINIFS/MAXIFS (hence the requirement for Office 2016) is over-complex and computationally heavy, so there is plenty of room for improvement! Maybe well-chosen helper cells would speed recalculation?
field '
BlockMarker'.The objective is to create a range name 'block' that is defined relative to the cell that references it and starts with the preceding marker and ends with the row before the next marker. Thus, in the example, = SUM(block value) will only sum of values occurring within the current block irrespective of the cell actually chosen for the formula.
The use case for such would be to allow a layout and analysis that applies to a single instance of an activity to be reused for an arbitrary number of instances with minimal modification. My solution, based upon the use of MINIFS/MAXIFS (hence the requirement for Office 2016) is over-complex and computationally heavy, so there is plenty of room for improvement! Maybe well-chosen helper cells would speed recalculation?