Hi Ralleberg,
Originally Posted by
Ralleberg
I can change the date at the top and it will dynamically change to the values entered in the above chart.
I'm sorry as I don't completely understand your situation and what you want to achieve.
Anyway, my guess is that you want to enter a date value and get the result based on the date value you enter.
If my guess is correct, this is my way to do the code :
2020-05-28_01-25-58.gif
The condition for the macro to run :
the data source table must always in the same format just like in your sample workbook.
There are two type of absence, which is in your sample workbook is vacation and sickness.
(The code need to be modified if for example there is another type of absence, accident for example).
The structure of the active sheet (where you want to get the result) must be the same like in your sample workbook, which is :
1 --- D
1 --- A
1 --- N
2 --- D
2 --- A
2 --- N
And again if the type of absence for example are three types,
the code need to be modified because the active sheet becomes like this :
1 --- D
1 --- A
1 --- N
2 --- D
2 --- A
2 --- N
3 --- D
3 --- A
3 --- N
That's if I'm not mistaken to get what you mean
Bookmarks