Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
umba-sr
 
Posts: n/a
Default calculate time periods

Hi,

This is something that's bothered me for some time, but I was never able to
discover the solution.

I have a list of employees, for example, and some of them have been in the
company since their first employment, but some of them haven't. Now, the
other group is the one that worries me.

Say, there is one such employee who had worked in some company prior to
this, and then didn't work at all for several months, and only then joined
our company.
I know that to calculate time difference, function is DATEDIF, and when I
add parametres to get years, months and days, formula and results look
something like this:
=DATEDIF(E4,TODAY(),"Y")&" years, " & DATEDIF(E4,TODAY(),"ym")&" months, " &
DATEDIF(E4,TODAY(),"md")&" days"

12 years, 5 months, 26 days

And this is the period he spent in our company, plus I have the same formula
for the time he spent in previous company, only with specific date instead of
TODAY().

Actual question is: How do I add these two results to get total of years,
months and days?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
daddylonglegs
 
Posts: n/a
Default calculate time periods


If dates spent at previous company were, say, C4 to D4

=DATEDIF(C4,TODAY()-E4+D4,"Y")&" years, " &
DATEDIF(C4,TODAY()-E4+D4,"ym")&" months, " &
DATEDIF(C4,TODAY()-E4+D4,"md")&" days"


--
daddylonglegs
------------------------------------------------------------------------
daddylonglegs's Profile: http://www.excelforum.com/member.php...o&userid=30486
View this thread: http://www.excelforum.com/showthread...hreadid=514855

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I calculate and show negative time in Excel? Ramonak Excel Worksheet Functions 1 September 7th 05 01:54 AM
How can I calculate my daily time? hcommet Charts and Charting in Excel 1 June 15th 05 06:21 PM
How to calculate time between two dates? ByGolly! Setting up and Configuration of Excel 1 February 12th 05 04:42 PM
Calculate between two time formats john86 Excel Worksheet Functions 3 February 12th 05 12:51 AM
how do i calculate time cards kljohnson Excel Worksheet Functions 1 November 30th 04 08:59 PM


All times are GMT +1. The time now is 09:06 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"