There are 3 basic formulae in the attached workbook to enable you to do this. Firstly, I have set up a helper column with this formula in L7:
This is copied down beyond your data (to allow for extra entries in future - the hyphens indicate how far down it has been copied) and it identifies the records that you want to copy elsewhere and establishes the correct sequence.
Secondly, this formula in C19:
gives the relative row numbers where those sequences occur. Then this third formula in D19:
brings the relevant data from column D of your table. This formula can be copied across into columns E to J in order to bring the corresponding data from those columns. Finally, all those formulae on row 19 can be copied down to complete the table, all bunched up. See what happens if you set the total for the bar in J10 to zero.
Hope this helps.
Pete
Bookmarks