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:

Column A
Column B
Column C
Name 1
35.00
Shift Type
10.00
Shift Type
12.00
Shift Type
13.00
Name 2
20.00
Shift Type
10.00
Shift Type
10.00

<TBODY>
</TBODY>

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

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
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,215,694
Messages
6,126,254
Members
449,305
Latest member
Dalyb2

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