Excel: Years of Service

I need a formula that will convert these two columns to a date.  Now I can do that by
=DATE(LEFT(E1,4),MID(E1,5,2),MID(E1,7,2))    and

but now I need to subtract Column E (start date) from Column F (Today's date) to calculate the length of time the employee has worked for the company.

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

[ fanpages ]IT Services ConsultantCommented:
Simply... the number of days will be:

=DATE(LEFT(F1,4),MID(F1,5,2),MID(F1,7,2)) - DATE(LEFT(E1,4),MID(E1,5,2),MID(E1,7,2))

You can then format that according to your needs, for example:

=DATEDIF(DATE(LEFT(E1,4),MID(E1,5,2),MID(E1,7,2)),DATE(LEFT(F1,4),MID(F1,5,2),MID(F1,7,2)),"y")&" years "&DATEDIF(DATE(LEFT(E1,4),MID(E1,5,2),MID(E1,7,2)),DATE(LEFT(F1,4),MID(F1,5,2),MID(F1,7,2)),"ym")&" months "&DATEDIF(DATE(LEFT(E1,4),MID(E1,5,2),MID(E1,7,2)),DATE(LEFT(F1,4),MID(F1,5,2),MID(F1,7,2)),"md")&" days"

Open in new window

Please see columns [J], [K], [L], & [O] within the attached workbook.
kvrogersAuthor Commented:
THANK YOU.  I am sending for verification and will close if accepted.  

kvrogersAuthor Commented:
She said this is perfect but she wants to know what is the average # of years that employees have worked for the company,
Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

[ fanpages ]IT Services ConsultantCommented:
OK, thank you for confirming the initial question has been answered as expected.

With the extended query, does your colleague wish to take account of local Public Holidays (& ignore any personal vacation time/any other absences)?  I am presuming this is probably too much to consider.

If the figure required is simply the total of all the days SUM(L1:L2379) = 8,900,970 divided by the number of employees (2379) with the result shown in years...

8,900,970 / 2,379 = 3,741.47541 (10 years 3 months 29 days)

See cell [O2382] of the updated attachment.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
kvrogersAuthor Commented:
Thank you again.  
kvrogersAuthor Commented:
I hope I gave you credit for everything you helped me with.  I am very grateful.

[ fanpages ]IT Services ConsultantCommented:
Yes; no issues at all.

Thanks for closing the question so promptly.

Good luck with the rest of the project.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.