Sum data in one column if adjacent cells are identical

Patrick Niedermeyer

New Member
Joined
Apr 10, 2020
Messages
7
Office Version
  1. 365
Platform
  1. Windows
Howdy ladies and gents.

It's been a while since I posted here, but I have another question I'm trying to answer. I have spreadsheets that output from a construction management software for employee time sheets. I'm building a macro that applies filters to project specific data, sorts by the Cost Code column, sums the hours in the column adjacent to the sorted Cost Code column, prompts the user for the labor rate assigned to each project and then sums up the total hours for each Cost Code and enters this summary in empty cells below the data. I'm stuck at how to sum the data according to the sorted cost code, and not sure how to display the summary.

1. What function sums a column and inserts a line below the group of data with identical labels?
2. How do I query the user for a multiplier then create a summary table below the data for each Cost Code sum?
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
That didn't read as I intended. I think I can use Pivot Tables, but want to do this in a Macro. Anyone out there?
 
Upvote 0

Forum statistics

Threads
1,214,572
Messages
6,120,306
Members
448,955
Latest member
Dreamz high

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