Forum Discussion
Pivot table question
Yes, this is what I need to do. How do I create an employee table? Do you mind creating steps to accomplish this?
Thanks.
I was able to use your formula.. Thank you so much!!
- Richelle GrajoMay 08, 2018
Microsoft
Hi,
Instead of calculating the years for today, how do I calculate the years for June 2018?
Thank you,
- Haytham AmairahMay 08, 2018Silver Contributor
Simply, replace this:
=DATEDIF(B2,TODAY(),"y")
With this:
=DATEDIF(B2,DATE(2018,6,1),"y")
Regards
- Richelle GrajoMay 08, 2018
Microsoft
Thanks again. It worked.
- Haytham AmairahMay 08, 2018Silver Contributor
Richelle,
You're welcome!
In fact, that table is a dummy table I created in less than one minute!
In your real table, you have to include the joining date for each employee, and then use the below formula to get the service years based on the joining date:
=DATEDIF(B2, TODAY(), "y")
After that, you can filter all employees with specific years of service by using a https://support.office.com/en-us/article/use-slicers-to-filter-data-249f966b-a9d5-4b0f-b31a-12651785d29d.
Regards