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.
 

Some videos you may like

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.

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
 

Watch MrExcel Video

Forum statistics

Threads
1,118,818
Messages
5,574,501
Members
412,599
Latest member
Schu94
Top