Calculating duration

CornfedCreature

New Member
Joined
Nov 20, 2013
Messages
4
Hi there,

I currently sitting in office stumbling over myself trying to put a formula in this report for my boss. Im guessing the deal was, he couldn't figure it out so has thrown the grenade my way.

I could really do with some credit by fixing this for him so any help you beautiful people can provide, the better!

In a nut shell, I have 2 fields, with 2 dates & times and I need to work out the duration in minutes.

eg:
[TABLE="width: 500"]
<tbody>[TR]
[TD]RAISED[/TD]
[TD]ASSIGNED[/TD]
[TD]Assignment Time (mins)[/TD]
[/TR]
[TR]
[TD][TABLE="width: 126"]
<tbody>[TR]
[TD="width: 126"]21/10/13 3.01pm[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 126"]
<tbody>[TR]
[TD="width: 126"]21/10/13 3.06pm[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]Formula?[/TD]
[/TR]
</tbody>[/TABLE]


If there is anyone out there who can help I would be a truly grateful Aussie.

Thanks all in advance,
RF
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
is that a real date time or text?
try
=SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(B1,".",":"),"pm"," pm"),"am"," am")-SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A1,".",":"),"pm"," pm"),"am"," am")
format cell as [m]
 
Last edited:
Upvote 0
Did you try Martin's suggestion, or are you speculating? :)
 
Upvote 0
Oh wait I missed the actual suggestion, (juggling work, employees and social media)

That worked a treat! Thank you so much Martin! You truly are an excel sorcerer
 
Upvote 0
is that a real date time or text?
try
=SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(B1,".",":"),"pm"," pm"),"am"," am")-SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A1,".",":"),"pm"," pm"),"am"," am")
format cell as [m]

Hey Martin,

I was hoping I could ask you another question related to this.

If I wanted to limit daily activity time frames from 8.30am - 5.00pm, how would I edit your formula?

The reason behind this is an employee will only operate within these hours so calculating the time outside these hours gives me inaccurate performance data.

Thanks again in advance. Considering this is the first time Ive joined one of these forums I am overwhelmed by the speed and content you have provided.

Cheers,
RF
 
Upvote 0

Forum statistics

Threads
1,223,901
Messages
6,175,277
Members
452,629
Latest member
SahilPolekar

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