Cumulative time calculation considering overlaps and gaps in excel database

martin_b4

New Member
Joined
Oct 17, 2023
Messages
7
Office Version
  1. 2016
Platform
  1. Windows
Dear members, sorry for long explanation. Already too much time spent on this and it is already really urgent..

Task is: calculate netto employment (in years, months and days) of thousands employees. Gaps in employment must be considered and not included into employment time, overlapping employments may not be double counted. Goal is to calculate total netto time of employment (years, months, days) and day of „anniversary“ i.e. when employee reaches another full year of employment. Thanks a lot.

1697586939226.png
 

Attachments

  • 1697586488760.png
    1697586488760.png
    164.3 KB · Views: 5

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
I used to consider using formulas (COUNTIF & SUMPRODUCT) to solve this requirement until I realized that the actual data involves thousands of employees, and using formulas could be time-consuming to process.

Therefore, I believe that the best solution is to use VBA. Before getting started, please attach a hypothetical file with shortened but representative data for us.
(use minisheet with XL2BB or attach file via gg drive, dropbox...)
 
Upvote 0
I used to consider using formulas (COUNTIF & SUMPRODUCT) to solve this requirement until I realized that the actual data involves thousands of employees, and using formulas could be time-consuming to process.

Therefore, I believe that the best solution is to use VBA. Before getting started, please attach a hypothetical file with shortened but representative data for us.
(use minisheet with XL2BB or attach file via gg drive, dropbox...)
Thanks a lot. How is possible to attach file via gg drive or dropbox? I see pnly upload image option.. Thank you
 
Upvote 0
I used to consider using formulas (COUNTIF & SUMPRODUCT) to solve this requirement until I realized that the actual data involves thousands of employees, and using formulas could be time-consuming to process.

Therefore, I believe that the best solution is to use VBA. Before getting started, please attach a hypothetical file with shortened but representative data for us.
(use minisheet with XL2BB or attach file via gg drive, dropbox...)
I would love to see SUMIF and Sumproduct solution/formula as well. Is it not a problem, that employees have different number of forme employers?
 
Upvote 0
Thanks a lot. How is possible to attach file via gg drive or dropbox? I see pnly upload image option.. Thank you
Attach you file via gg drive or drop box. Then copy the link.
Just post the link here. Do not forget to share full.
 
Upvote 0
Where is your desired output? Please input it manually and we will help with formula/code script.
 
Upvote 0
Where is your desired output? Please input it manually and we will help with formula/code script.
I am terrible sorry, I can not Edit the file right now. Will be ale to manage in several hours..🙁 Wished result:In an separate column should be Total employment until the end of current month. Or there might be 3 columns: years, months and days of total employment until the end of current month. For Adam its 34 years, 6 months and 30 days if I am calculating right.

And final column is "fututre anniversary" when employee reaches another full year of employment. In case of Adam its april 2024.
 
Upvote 0

Forum statistics

Threads
1,215,374
Messages
6,124,567
Members
449,171
Latest member
jominadeo

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