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!

DayCategoryStart TimeEnd Time
1Admin
8:00 AM10:00 AM
Meeting10:00 AM11:00 AM
Admin11:00 AM12:30 PM
Admin1:30 PM2:00 PM
Production2:00 PM4:00 PM
2Meeting8:00 AM9:00 AM
Training9:00 AM12:00 PM
Admin1:00 PM2:00 PM
Production2:00 PM3:30 PM
Admin3:30 PM4:00 PM
3Production8:00 AM11:30 AM
Admin11:30 AM12:00 PM
Production1:00 PM4:00 PM

<tbody>
</tbody>

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:

DayAdminMeetingProductionTraining
14120
21.5 (or 1:30, both work)11.5 (or 1:30, both work)3
3.5 (or 0:30, both work)06.5 (or 6:30, both work)0

<tbody>
</tbody>

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

Wes
 

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.
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,214,787
Messages
6,121,565
Members
449,038
Latest member
Guest1337

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