Conditional Consolidate

Drmwvr7266

Board Regular
Joined
Apr 7, 2002
Messages
164
I have the basic understanding of consolidating down. I have similar names in column A that consolidate the hours in column B.

Now, can I throw in a twist? Column A has a name. Column B has a code. Column C has the hours.

Did some reading up on it but not sure if I can do this. Basically, If column A and column B match, then they consolidate. Otherwise, they don't.

Name Code Hrs.
Bob Code 1 5
Bob Code 2 5
Bob Code 1 3
Mike Code 1 4
Mike Code 2 7


The result would be:

Bob Code 1 8
Bob Code 2 5
Mike Code 1 4
Mike Code 2 7


Any suggestions? I am adding it into some code that I have been developing over time to reduce payroll prep time on Monday Mornings.
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
Use a PivotTable...
Date_example.xls
ABCDEFGHIJK
1NameCodeHrs.SumofHrs.
2BobCode15NameCodeTotal
3BobCode25BobCode18
4BobCode13Code25
5MikeCode14MikeCode14
6MikeCode27Code27
7
Sheet2
 
Upvote 0

Forum statistics

Threads
1,214,520
Messages
6,120,013
Members
448,935
Latest member
ijat

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