Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
Solved

# Calcalate hours active

Posted on 2013-12-17
Medium Priority
142 Views
Hi Experts,

I have a spreadsheet which contains a (dynamic) value for "hours worked".  From this value (let's say 12) I want to plot a graph showing the hours worked, against all 24 hours in a day.

The middle of the shift is always 01:00AM

So, if hours worked = 12 the graph should show that the shift began at 19:00 and finished at 07:00.

It should be assumed that 1am always represents the middle of the shift.  I only want to show whole hours if possible (i.e. I don't want the graph to have to show 30 minute slots, caused by dividing the shift lenght by 2), but this is not a show-stopper.

Help!!!!

Thanks :)
0
Question by:Codestone
• 4
• 3

LVL 43

Expert Comment

ID: 39723657
You can try a stacked bar or stacked column chart showing a transparent bar or column for the the off hours and a colored one for the working hours.
0

LVL 1

Author Comment

ID: 39723662
Sorry if I wasn't clear,

I know how to generate a graph, I'm trying to calculate the hours worked.
0

LVL 43

Expert Comment

ID: 39723676
If A1 contains hours in "time" format then you can use

=25/24-INT(A1*12)/24
0

LVL 54

Accepted Solution

Rgonzo1971 earned 2000 total points
ID: 39723683
HI,

pls try

TimeEE20131217.xlsx
Regards
0

LVL 1

Author Closing Comment

ID: 39723816
Legend,

Thanks!
0

LVL 1

Author Comment

ID: 39723827
Sorry, so thanks for this - I now know the start and end times of the shift.

Can you show me how to plot this?
0

LVL 43

Expert Comment

ID: 39723841
Did my formula not work or you did not try it?
0

LVL 1

Author Comment

ID: 39726549
I couldn't get it to work, no.

THanks.
0

## Featured Post

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are â€¦
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.
Enter Foreign and Special Characters Enter characters you can't find on a keyboard using its ASCII code ... and learn how to make a handy reference for yourself using Excel ~ Use these codes in any Windows application! ... whether it is a Micrâ€¦
###### Suggested Courses
Course of the Month15 days, 1 hour left to enroll