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
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