Solved

Still Stuck in TIME - Pivot table and time

Posted on 2011-02-25
6
207 Views
Last Modified: 2012-05-11
Sorry to beat a dead horse, but still stuck with the 24 hour issue of time.  I attached a sheet to show wmy problem. When you go from 0700-0700, I get 0 for my answer. Plus on my pivot table, my grand totals equal Zero.

Thanks

expert-exchange.xlsx
0
Comment
Question by:bvanscoy678
  • 3
  • 2
6 Comments
 
LVL 92

Accepted Solution

by:
Patrick Matthews earned 500 total points
ID: 34982723
bvanscoy678,

If there is ever ANY possibility that a shift will cross a day boundary, then you should always record the date and time for both the "in" and the "out".

In the short term, change your formula for Total Hours to:

=24*(G6+(F6>=G6)-F6)

and change the number format for that column to numeric with two decimal places.

Now, rebuild your PivotTable.

Of course, this will only accommodate shifts that span a single day boundary.  Any shifts spanning 2+ day boundaries will be incorrect.

Patrick
0
 

Author Comment

by:bvanscoy678
ID: 34982830
Our shifts always cross two days. We start at 0700 and work until 0700 the next day.

I have been playing with this formula, but still not good.

=IF(E6=F6,TIME(23,59,59)+TIME(0,0,1);F6+(E6>F6)-E6)


Thank you
0
 
LVL 5

Expert Comment

by:roger_karam
ID: 34982845
Go with matthews formula and you can change the number format in the PivotTable and sheet to [h]:mm:ss

-RK expert-exchange-v1.xlsx
0
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 

Author Comment

by:bvanscoy678
ID: 34982847
Yes, using your formula, I do get same results. I am trying to simplfy the process, but might have to include date with time.

Time IN      Time OUT      "Total
Hours"
7:00      15:47      18:48
15:47      18:00      5:12
18:00      7:00      0:00
7:00      7:00      0:00
0
 
LVL 5

Expert Comment

by:roger_karam
ID: 34982862
Thats because of the number format. Regular time format is "hh:mm:ss" which goes around in 24 hours. now [h]:mm:ss sums the hours even over 24...
0
 

Author Closing Comment

by:bvanscoy678
ID: 34982908
Yes, thank you. It was the formatt I was messing up.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

A2 = A1 That kind of cell reference is relative.  If you copy it from A2 to B2, then B2 will get this: B2 = B1 That's all fine and good, but if you then insert a new row above row 2, you'll find: A3 = A1 B3 = B1 This is intentional. …
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now