I have a spreadsheet of the form
Subitem1 5 Subitem2 4 Subitem3 7 <potential marker> ItemB Subitem 4
I want to sum the values next to Subitem to a total next to ItemA, ItemB, etc. I may add additional subitems, so I would like the range in my formula to be dynamic. Instead of SUM(B2:B5), I would prefer to sum until ItemB regardless of how many subitems I add or remove.
If it helps, I can add some sort of end-of-item-marker or empty row or something where I have written "potential marker".
As far as I can see when I play around, Google Spreadsheet will not increase the formula range when I insert a row in the middle of a range.