VLOOKUP Help - Combining several cells (example included)

wesleyterrill

New Member
Joined
Feb 9, 2016
Messages
15
Hey guys! I'm doing some time analysis and I was hoping someone could offer some help. Basically, I've broken down my days into several different categories and I'd like to summarize the total of each category for each day. Kind of hard to explain, see my example for clarification :) Thank you for any help!


This is a general example of what my time tracking looks like. For Day 1, I'd like to combine all categories into one total for each day... so Day 1 will have 4 hours of Admin, 1 hour of Meeting, and 2 hours of Production. I know one formula for counting hours would look like: =TEXT(B4-B3, "h:mm") *[h is for hours, mm is for minutes]. I'm assuming I will have to combine that formula with a VLOOKUP to get the results I want. I'm sure there are other ways to go about it, any suggestions would be greatly appreciated!

[TABLE="width: 500"]
<tbody>[TR]
[TD]Day[/TD]
[TD]Category[/TD]
[TD]Start Time[/TD]
[TD]End Time[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Admin
[/TD]
[TD]8:00 AM[/TD]
[TD]10:00 AM[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]Meeting[/TD]
[TD]10:00 AM[/TD]
[TD]11:00 AM[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]Admin[/TD]
[TD]11:00 AM[/TD]
[TD]12:30 PM[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]Admin[/TD]
[TD]1:30 PM[/TD]
[TD]2:00 PM[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]Production[/TD]
[TD]2:00 PM[/TD]
[TD]4:00 PM[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]Meeting[/TD]
[TD]8:00 AM[/TD]
[TD]9:00 AM[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]Training[/TD]
[TD]9:00 AM[/TD]
[TD]12:00 PM[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]Admin[/TD]
[TD]1:00 PM[/TD]
[TD]2:00 PM[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]Production[/TD]
[TD]2:00 PM[/TD]
[TD]3:30 PM[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]Admin[/TD]
[TD]3:30 PM[/TD]
[TD]4:00 PM[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]Production[/TD]
[TD]8:00 AM[/TD]
[TD]11:30 AM[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]Admin[/TD]
[TD]11:30 AM[/TD]
[TD]12:00 PM[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]Production[/TD]
[TD]1:00 PM[/TD]
[TD]4:00 PM[/TD]
[/TR]
</tbody>[/TABLE]

To reiterate, I'd like to consolidate each category into a daily total (of time in hours). This is what my results should look like:

[TABLE="width: 600"]
<tbody>[TR]
[TD]Day[/TD]
[TD]Admin[/TD]
[TD]Meeting[/TD]
[TD]Production[/TD]
[TD]Training[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]4[/TD]
[TD]1[/TD]
[TD]2[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]1.5 (or 1:30, both work)[/TD]
[TD]1[/TD]
[TD]1.5 (or 1:30, both work)[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD].5 (or 0:30, both work)[/TD]
[TD]0[/TD]
[TD]6.5 (or 6:30, both work)[/TD]
[TD]0[/TD]
[/TR]
</tbody>[/TABLE]

Thanks for the consideration, everyone. Any help would be greatly appreciated! Let me know if you need any clarification :)

Wes
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
Try something like this:


Excel 2010
ABCDEFGHIJ
1DayCategoryStart TimeEnd TimeDayAdminMeetingProductionTraining
21Admin8:00 AM10:00 AM14.01.02.00.0
31Meeting10:00 AM11:00 AM21.51.01.53.0
41Admin11:00 AM12:30 PM30.50.06.50.0
51Admin1:30 PM2:00 PM
61Production2:00 PM4:00 PM
72Meeting8:00 AM9:00 AM
82Training9:00 AM12:00 PM
92Admin1:00 PM2:00 PM
102Production2:00 PM3:30 PM
112Admin3:30 PM4:00 PM
123Production8:00 AM11:30 AM
133Admin11:30 AM12:00 PM
143Production1:00 PM4:00 PM
Sheet1
Cell Formulas
RangeFormula
G2=SUMPRODUCT(($A$2:$A$14=$F2)*($B$2:$B$14=G$1)*($D$2:$D$14-$C$2:$C$14))*24
 
Upvote 0
There are a few simple ways to fill in column A.

One is to enter the formula =A1 in A2 and then copy A2, select all of column A, Home: Find & Select > Go To Special > Blanks > OK, then paste.

Now copy column A and paste values to get rid of the formulas.
 
Upvote 0
It's a Pivot Table solution.
You can add a duration calculation to your source table or do a calculated field for duration.
If you want H:MM duration use the format "[H]:MM:SS"
 
Upvote 0

Forum statistics

Threads
1,223,708
Messages
6,174,005
Members
452,542
Latest member
Bricklin

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