Forum Discussion
Excel Calendar adding extra days.
- Jan 17, 2019
It looks like that's Employee Attendance Record Template.
They use formulas
For the beginning of the month
=IFERROR(IF(TEXT(DATE(Calendar_Year,ROW($A1),1),"ddd")=LEFT(C$5,3),DATE(Calendar_Year,ROW($A1),1),""),"")
In the middle of calendar
=IFERROR(IF(R6>=1,R6+1,""),"")
and at the end of it
=IFERROR(IF(AND(AM6>=1,AM6+1<=DATE(Calendar_Year,ROW($A1)+1,0)),AM6+1,""),"")
You may safely copy cell from the end of the calendar with latest formula (e.g. in column AR) and paste it into the cells starting, let say, from column X or so.
I copied cells AL through AR and pasted the copied formulas in cells AE through AK and it removed all of the extra days in the month. Now each month only reflects day 1 through 28, 30 or 31 depending on its corresponding last day. Thank you for your help Sergei. I'm still a rookie with excel, but I'm learning everyday.
Now that I've copied the formulas as mentioned the "Key Statistics" box counts are not computing.
The formula in the key stats boxes is as follows:
=SUMIFS(LeaveTracker[Days],LeaveTracker[Employee Name],valSelEmployee,LeaveTracker[Start Date],">="&DATE(Calendar_Year,1,1),LeaveTracker[End Date],"<"&DATE(Calendar_Year+1,1,1))
=SUMIFS(LeaveTracker[Days],LeaveTracker[Employee Name],valSelEmployee,LeaveTracker[Start Date],">="&DATE(Calendar_Year,1,1),LeaveTracker[End Date],"<"&DATE(Calendar_Year+1,1,1),LeaveTracker[Type of Leave],'Leave Types'!B4)
It was computing just fine until I copied and pasted the cells as previously discussed.
- SergeiBaklanJan 17, 2019MVP
Hi Charoid,
What do you mean under Not computing? I tested it with Employees #1 and #3, numbers in the boxes are the same.
To change the formula select cells AR6:AR17 and drag selection to the left till middle of the calendar. Please check attached changed file.
- ChairodJan 17, 2019Copper ContributorThank you again Sergei. When I added an event on the employee leave tracker sheet, it would transfer to the calendar, but it did not add to the running total for each leave type listed on the bottom. Your copy works perfectly.