Working days per worker, per event and month

JCabral

New Member
Joined
Feb 11, 2017
Messages
16
Good afternoon
I have a spreadsheet, which has an events database (BD_Eventos), which has data for each worker (OIA NAME).

There are four types of events (Férias - Ausências - Campanhas - Avaria). The difference in terms of dates is that the "Ausências" event is always daily, while the others are time intervals (the period can only be one day).
I also have a tab (WSS) that has the reference year (Cell A3), the calculation month (Cell B3/B4) and the following month (Cell C3/C4), that is, I will then present the data graphically for each two months(but this is not the problem) and I also have national holidays (Type=1), company holidays (Type=2) and holidays for each worker depending on their place of work, which are municipal holidays (Columns AH to AJ).

What I need to calculate, and it can be by Formula or via VBA, were the working days for each worker, for each event and for each month, WsO tab, where I have for each worker (column E) the event "Férias" Columns F:Q - corresponding to each month) and the same in the following columns for each of the other events.

What is need to keep in mind: The database is not fixed, it changes every day with the introduction of new events, and to calculate working days it is necessary to take into account holidays, taking into account that National and of Companies are for all workers and then there are municipal holidays that are for each worker.

All help will be welcome

Sample File
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
Good afternoon
I have a spreadsheet, which has an events database (BD_Eventos), which has data for each worker (OIA NAME).

There are four types of events (Férias - Ausências - Campanhas - Avaria). The difference in terms of dates is that the "Ausências" event is always daily, while the others are time intervals (the period can only be one day).
I also have a tab (WSS) that has the reference year (Cell A3), the calculation month (Cell B3/B4) and the following month (Cell C3/C4), that is, I will then present the data graphically for each two months(but this is not the problem) and I also have national holidays (Type=1), company holidays (Type=2) and holidays for each worker depending on their place of work, which are municipal holidays (Columns AH to AJ).

What I need to calculate, and it can be by Formula or via VBA, were the working days for each worker, for each event and for each month, WsO tab, where I have for each worker (column E) the event "Férias" Columns F:Q - corresponding to each month) and the same in the following columns for each of the other events.

What is need to keep in mind: The database is not fixed, it changes every day with the introduction of new events, and to calculate working days it is necessary to take into account holidays, taking into account that National and of Companies are for all workers and then there are municipal holidays that are for each worker.

All help will be welcome

Sample File
The link to the sample file does not work. It gets a Transfer not found message:
1718655708169.png
 
Upvote 1

Forum statistics

Threads
1,223,705
Messages
6,173,996
Members
452,542
Latest member
Bricklin

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