Selecting next "empty" cell down from the current cell (summing at the top of a range)

Brian.Crawford

Board Regular
Joined
Oct 3, 2007
Messages
136
I am wanting to sum a column at the top of a group of rows (groups are separated from each other by a blank row and also [currently] have a unique identifier [column] per group).
I can do this with a VBA function, or in Excel directly using a helper column (counting the unique IDs) but have been unable to accomplish it directly on the WS without the helper column. I have been trying using
=SUM(OFFSET(CelltoSumInto,1,0,????????,1))
but have not figured out how to count the cells down from the cell to be summed into, to the next blank row (without the helper column).
ie
Total 50
item1 25
item2 25
(blank row)
Total 10
item3 5
item4 5

Any suggestions
Thanks Brian
 

Some videos you may like

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).

Robert Mika

MrExcel MVP
Joined
Jun 29, 2009
Messages
7,256
I am wanting to sum a column at the top of a group of rows (groups are separated from each other by a blank row and also [currently] have a unique identifier [column] per group).
I can do this with a VBA function, or in Excel directly using a helper column (counting the unique IDs) but have been unable to accomplish it directly on the WS without the helper column. I have been trying using
=SUM(OFFSET(CelltoSumInto,1,0,????????,1))
but have not figured out how to count the cells down from the cell to be summed into, to the next blank row (without the helper column).
ie
Total 50
item1 25
item2 25
(blank row)
Total 10
item3 5
item4 5

Any suggestions
Thanks Brian
Excel Workbook
ABC
1Total5050
2item125
3item225
4
5Total1033
6item35
7item45
8item23
9
10Total111
11iemt56
12item755
Sheet1
 

Brian.Crawford

Board Regular
Joined
Oct 3, 2007
Messages
136
Thanks,
This looks to require a 3rd column which doesn't really work for my situation. Can I simply put the formula (as non-array) at the top of every group.
I know in advance how many groups there will be (they will pre-setup) but not how many items under each one (but at least the top total row plus one item row). it is intended that adding new "items" to a group will be done by a user instigated macro that inserts a new row and copies all required formula to that row. Probably should have described this previously
thanks
 

Robert Mika

MrExcel MVP
Joined
Jun 29, 2009
Messages
7,256
Thanks,
This looks to require a 3rd column which doesn't really work for my situation. Can I simply put the formula (as non-array) at the top of every group.
I know in advance how many groups there will be (they will pre-setup) but not how many items under each one (but at least the top total row plus one item row). it is intended that adding new "items" to a group will be done by a user instigated macro that inserts a new row and copies all required formula to that row. Probably should have described this previously
thanks

If you need formula to be eneter beetween values you need VBA anyway.
 

Watch MrExcel Video

Forum statistics

Threads
1,122,216
Messages
5,594,886
Members
413,947
Latest member
gizmolucy

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top