Solved

# Question to DeFranker

Posted on 2012-03-20
303 Views
Thanks that formula worked great, but what would the formula be for anything over 30 minutes rather 60?
0
Question by:TonyBarnes
[X]
###### Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

• Help others & share knowledge
• Earn cash & points
• 2

LVL 3

Expert Comment

ID: 37742762
You can see my additional comment in your previous question for more explanation. Basically, change the TIME(1,0,0) part, which is in the format TIME(hour,minute,second). For 30 minutes, the formula would look like this:

=HOUR(MAX(B1-A1-TIME(0,30,0),0))*60+MINUTE(MAX(B1-A1-TIME(1,0,0),0))

Note that the cell where this formula is in must not be in "Date" format, otherwise you'll get a bunch of nonsense.
0

Author Comment

ID: 37742899
i HAVE JUST TRIED THIS AND WHEN I THEN PUT IN START TIME10:00, END TIME10:32 THE RESULT IS BLANK WHEN I ACTUALLY NEED IT TO BE 2!  i.e. The first 30 minutes are included in cost, any additional minutes are charged.
0

LVL 3

Accepted Solution

DaFranker earned 500 total points
ID: 37743044
Looks like you figured out my mistake, judging from your comment in the other question. As you've said, it should actually be like this:

=HOUR(MAX(B1-A1-TIME(0,30,0),0))*60+MINUTE(MAX(B1-A1-TIME(0,30,0),0))

I only changed the first TIME() call, without reading the whole line again. The second TIME() call also needed to be changed.
0

## Featured Post

Question has a verified solution.

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

Outline Suppose you have some simple text based data in Excel that you would like to display as a PowerPoint presentation. Of course it would be possible to write some fairly complex VBA code that created a new slide for each line of the Excel data…
This article will shed light on the latest trends when it comes to your resume building needs. For far too long, the traditional CV format has monopolized the recruitment market.
This video shows the viewer how to set up and create Footnotes in their document. Click on the References tab: Select "Insert Footnote": Type in desired text:
An overview on how to enroll an hourly employee into the employee database and how to give them access into the clock in terminal.
###### Suggested Courses
Course of the Month3 days, 2 hours left to enroll