Update calendar schedule with holidays

kasper

New Member
Joined
Feb 4, 2009
Messages
33
I'm a newbie who has grand ideas which may not be possible.
What I have is a yearly calendar with months across the top and days 1-31 down the left. My colleagues would enter PI for personal illness, or V for vacation and those days are totaled at the bottom of the column for each month. On a separate worksheet I have calculated the stat holidays from current year till forever (I would make a separate calendar worksheet each year).
What I want to do is on the calendar sheet, mark each of the stat holidays with an 'H'. Is this possible?
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
Can you post what you have so far, cause i'm a little confuse, isn't your calendar sheet the yearly calendar sheet, where you already put the PI's and the V's?
 
Upvote 0
JanuaryFebruaryMarchAprilMay
1H
2v
3vH
4piv
5
6H

<tbody>
</tbody>
Attendance 2015 (worksheet 1)

HolidayWhenDate
New Year's DayFirst day in January1-Jan-15January12015
Family DayThird Monday in February16-Feb-15February16
Good FridayFriday before Easter Monday3-Apr-15April3
Easter MondayFirst Monday after first full moon in spring5-Apr-15April6
Victoria DayMonday before May 2518-May-15May18
Canada DayJuly 11-Jul-15July1
Civic HolidayFirst Monday in August3-Aug-15August3

<tbody>
</tbody>
holiday data (worksheet 2) - the date column dates are created by formula based on the year

I want the employee to enter their own values (sick days, or vacation days), but pre-populate holidays for them (if possible).
 
Upvote 0
Sorry to be impatient, but if this isn't possible then I will just go ahead and distribute the workbook as-is. Can someone tell me if my request is doable please?
 
Upvote 0
hi, to makes things easier i would advice you the following, create am helper column on sheet2 ( see exmple bellow)


Book1
ABCDEFGH
1HolidayWhenDate
2New Year's DayFirst day in January01-jan-15January1January1H
3Family DayThird Monday in February16-fev-15February16February16H
4Good FridayFriday before Easter Monday03-abr-15April3April3H
5Easter MondayFirst Monday after first full moon in spring05-abr-15April6April6H
6Victoria DayMonday before May 2518-05-2015May18May18H
7Canada DayJuly 101-jul-15July1July1H
8Civic HolidayFirst Monday in August03-08-2015August3August3H
Sheet2
Cell Formulas
RangeFormula
G2=D2&E2


drag down


And use a simple VLOOKUP on your attendance sheet( like bellow)


Book1
ABCDEFGHI
1JanuaryFebruaryMarchAprilMayJuneJulyAugust
21HH
32
43HH
54
65
76H
87
98
109
1110
1211
1312
1413
1514
1615
1716H
1817
1918H
Attendance 2015
Cell Formulas
RangeFormula
B2=IFNA(VLOOKUP(B$1&$A2,Sheet2!$G$2:$H$8,2,0),"")


drag Down/right
 
Upvote 0
Fantastic! For some reason I couldn't get ifna to work - kept throwing #name? errors, so I used iferror and it worked great.
Just to further automate things, I set up named ranges for the holidays each year (year2015 = $G$2:$H$8). Is there a way to enter the name of the range somewhere on the Attendance sheet and refer to it in the formula? Would make it so much easier to update for future years.
 
Upvote 0
I don't know if i understood your question, is it something like this:

ABCDEFGHIJ
1HolidayWhenDateYear_2015Year_2016
2New Year's DayFirst day in January01-jan-15January1January1HJanuary4H
3Family DayThird Monday in February16-fev-15February16February16HFebruary11H
4Good FridayFriday before Easter Monday03-abr-15April3April3HApril12H
5Easter MondayFirst Monday after first full moon in spring05-abr-15April6April6HApril13H
6Victoria DayMonday before May 2518-05-2015May18May18HMay14H
7Canada DayJuly 101-jul-15July1July1HJuly15H
8Civic HolidayFirst Monday in August03-08-2015August3August3HAugust16H

<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet2



I manually typed dummy dates on sheet2 cells I2:I8 to create a named range (Year_2016)
Then on sheet attendance you just have to change the year on the formula:

ABCDEFGHI
1JanuaryFebruaryMarchAprilMayJuneJulyAugust
21
32
43
54H
65
76
87
98
109
1110
1211H
1312H
1413H
1514H
1615H
1716H
1817
1918

<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Attendance 2015

Worksheet Formulas
CellFormula
B2=IFNA(VLOOKUP(B$1&$A2,Year_2016,2,0),"")

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>


if on this formula above you change 2016 to 2015 everything changes.....

Know to create named ranges before using this formula create this 2 named ranges on the name maneger box:

=OFFSET(Sheet2!$G$2;;;COUNTA(Sheet2!$G$2:$G$25);2)

=OFFSET(Sheet2!$I$2;;;COUNTA(Sheet2!$I$2:$I$25);2)
 
Upvote 0
Sorry, guess I'm not the greatest at explaining myself, but you were on the right track anyway.
I was hoping to change the existing lookup formula to something more like this...
=IFERROR(VLOOKUP(D$3&$C4,"year"&$b$2,2,0),"")
("year"&$b$2 = year2015)
Where B2 on every year's Attendance sheet would be the current year. Then I wouldn't need to update all the formulas on each year's spreadsheet - I'd only have to change the year in B2 to have all the holidays updated for that sheet.

Excel 2012
BCDEF
22015
3JanuaryFebruaryMarch
41H
52
63
74
85
96
107
118

<tbody>
</tbody>
Sheet1

Worksheet Formulas
CellFormula
D4=IFERROR(VLOOKUP(D$3&$C4,Sheet2!$G$2:$H$8,2,0),"")

<tbody>
</tbody>

<tbody>
</tbody>
 
Upvote 0

Forum statistics

Threads
1,215,455
Messages
6,124,937
Members
449,196
Latest member
Maxkapoor

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