Adding DateDiff Values

MikeyMo

New Member
Joined
Mar 26, 2020
Messages
6
Office Version
  1. 365
  2. 2016
  3. 2013
Platform
  1. Windows
RE: Time tracking application, or at least my attempt at one. I need to calculate the total number of hours that a person was present. Very similar to punching a clock.

  • I have two sets of dates/times that are added via a timestamp function.
  • I have two DateDiff functions set up in an array to calculate the difference between in each set. A1(in) and B1(out) one set. C1(in) and D1(out) are the other.

I can get the individual number of hours for each set, but I don't know how to display the combined totals ((A1+B1) + (C1+D1) in col E.

Suggestions/solutions?

Thanks.
Mike
 

Attachments

  • DateDiffCode.png
    DateDiffCode.png
    21 KB · Views: 9
  • DateDiffSheet.png
    DateDiffSheet.png
    11.4 KB · Views: 9

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
I made a mistake in my explanation. What I meant to write was...

I can get the individual number of hours for each set, but I don't know how to display the combined totals - Diff((A1/B1) + Diff(C1/D1) in col E, which would give me the total hours someone was present.
 
Upvote 0

Forum statistics

Threads
1,224,820
Messages
6,181,160
Members
453,021
Latest member
Justyna P

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