Summing cell rows below a dept code based on dept name

Apples52

New Member
Joined
Sep 25, 2023
Messages
25
Office Version
  1. 365
Platform
  1. Windows
Wondering if this is possible.

Department name is in column D and earnings $ are in columns O-AH. I want the formula to be in the red text in column B. I have a 365 subscription.

What I'm trying to accomplish is summing the totals row O-AH for each department name starting on the row below "Totals for home department code xxx" Since the number of pay periods varies from month to month, I can't just apply a simple sum formula in the cells I have written "FORMULA" as that may not be where that "total" line lies in the next month if there are 5 pay periods.

For example, if the Dept Name "Sales" shows up in column D, sum the row starting below "Totals for Home Department Code 100" O-AH. This example should sum O6:AH6. Next month if there were 4 pay periods, the "Totals for Home Department Code 100" would move down a row to row 6, so the formula should grab O7-AH7.
 

Attachments

  • Pay Sum by Dept.png
    Pay Sum by Dept.png
    41 KB · Views: 13

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
Wondering if this is possible.

Department name is in column D and earnings $ are in columns O-AH. I want the formula to be in the red text in column B. I have a 365 subscription.

What I'm trying to accomplish is summing the totals row O-AH for each department name starting on the row below "Totals for home department code xxx" Since the number of pay periods varies from month to month, I can't just apply a simple sum formula in the cells I have written "FORMULA" as that may not be where that "total" line lies in the next month if there are 5 pay periods.

For example, if the Dept Name "Sales" shows up in column D, sum the row starting below "Totals for Home Department Code 100" O-AH. This example should sum O6:AH6. Next month if there were 4 pay periods, the "Totals for Home Department Code 100" would move down a row to row 6, so the formula should grab O7-AH7.
Investigate XL2BB for providing sample data & expected results to make it easier for helpers to understand just what you have & where it is and also what you want & where it is to be.

(If you have trouble with XL2BB, review the "XL2BB Icons greyed out" link in the 'Known XL2BB issues' section near the top of the XL2BB Instructions page linked below.)

XL2BB - Excel Range to BBCode
 
Upvote 0

Forum statistics

Threads
1,225,726
Messages
6,186,674
Members
453,368
Latest member
xxtanka

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