subtotal by header?

d_alten

New Member
Joined
Mar 6, 2013
Messages
2
Office Version
  1. 365
Platform
  1. Windows
I have a sheet of data I need to subtotal. The issue is that the subtotal criteria is mixed in one column.
Example:

[TABLE="width: 500"]
<TBODY>[TR]
[TD]Column A
[/TD]
[TD]Column B
[/TD]
[TD]Column C
[/TD]
[/TR]
[TR]
[TD]Name 1
[/TD]
[TD][/TD]
[TD]35.00
[/TD]
[/TR]
[TR]
[TD]Shift Type
[/TD]
[TD]10.00
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Shift Type
[/TD]
[TD]12.00
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Shift Type
[/TD]
[TD]13.00
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Name 2
[/TD]
[TD][/TD]
[TD]20.00
[/TD]
[/TR]
[TR]
[TD]Shift Type
[/TD]
[TD]10.00
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Shift Type
[/TD]
[TD]10.00
[/TD]
[TD][/TD]
[/TR]
</TBODY>[/TABLE]

I need a formula that will subtotal column B based on when the NAME in column one changes, but column A has the name and shift type in the same column and it's not always 3 lines under the name it could be 6 for one person and 2 for another. So Column C is what I need the end result to be. I will take any direction or help you can give me.


Thanks

Diane
 
Last edited:

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
Hi Diane and welcome to MrExcel.

Does this work for you?....

Excel Workbook
ABCD
1Data1Data2Result
2Name 135
3Shift Type10
4Shift Type12
5Shift Type13
6Name 220
7Shift Type10
8Shift Type10
9Name 320
10Shift Type5
11Shift Type5
12Shift Type5
13Shift Type5
14Name 420
15Shift Type10
16Shift Type10
17Name5
18
Sheet1


The formula in C2 needs to be copied down.
I got the solution from here and changed it slightly....
SUM Column until blank cell is found

I hope that helps.

Good luck.

Ak
 
Upvote 0

Forum statistics

Threads
1,223,240
Messages
6,170,951
Members
452,368
Latest member
jayp2104

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
Back
Top