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

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.

Mark W.

MrExcel MVP
Joined
Feb 10, 2002
Messages
11,654
Use a PivotTable...
Date_example.xls
ABCDEFGHIJK
1NameCodeHrs.SumofHrs.
2BobCode15NameCodeTotal
3BobCode25BobCode18
4BobCode13Code25
5MikeCode14MikeCode14
6MikeCode27Code27
7
Sheet2
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,163,440
Messages
5,831,643
Members
430,079
Latest member
lucasabreueng

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
Top