Calendar events in excel

Оформление календаря

Одним из распространенных способов использования Excel является создание списков событий, встреч и других мероприятий, связанных с календарем. В то время как Excel способен с легкостью обрабатывать эти данные, он не имеет быстрого способа визуализировать эту информацию. Нам потребуется немного творчества, условного форматирования, несколько формул и 3 строки кода VBA, чтобы создать симпатичный, интерактивный календарь. Рассмотрим, как можем все это реализовать.

Я нашел этот пример на сайте Chandoo.org и делюсь им с вами.

Интерактивный календарь в Excel

На выходе у нас должно получиться что-то вроде этого:

Интерактивный календарь

Создаем таблицу с событиями

На листе Расчеты создаем таблицу со всеми событиями

Исходные данные

Настраиваем календарь

Так как все события происходят в рамках двух месяцев, я просто ввел первую дату первого месяца, протянул вниз и отформатировал так, чтобы было похоже на календарь. На данном этапе он должен выглядеть следующим образом.

Календарь excel

Задаем имя диапазону дат в календаре

Это просто, выделяем весь диапазон дат нашего календаря и в поле Имя задаем «Календарь»

имя календаря

Определяем ячейку с выделенной датой

На листе Расчеты выбираем пустую ячейку и задаем ей имя «ВыделеннаяЯчейка». Мы будем использовать ее для определения даты, которую выбрал пользователь. В нашем случае, это ячейка G3.

Добавляем макрос на событие Worksheet_selectionchange()

Описанный ниже код поможет идентифицировать, когда пользователь выбрал ячейку в диапазоне “Календарь”. Добавьте этот код на лист с календарем. Для этого открываем редактор VBA, нажатием Alt+F11. Копируем код ниже и вставляем его Лист1.

1
2
3
4
5

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Application.Intersect(Target, Range(«calendar»)) Is Nothing Then
[selectedCell] = ActiveCell.Value
End If
End Sub

VBA редактор

Настраиваем формулы для отображения деталей при выборе даты

Изменение даты на календаре ведет за собой изменение 4-х параметров отображения в анонсе: название, дата, место и описание. Зная, что дата находится в ячейке «ВыделеннаяЯчейка», воспользуемся формулами ВПР, ЕСЛИ и ЕСЛИОШИБКА для определения этих параметров. Логика формул следующая: если на выбранную дату существует событие, возвращает данные этого события, иначе возвращает пустую ячейку. Формулы с определением параметров события находятся на листе Расчеты, в ячейках G10:G13.

Добавление анонса

Наконец добавляем в лист Календарь 4 элемента Надпись и привязываем их к данным, находящихся в ячейках G10:G13 листа Расчеты.

Совет: для того, чтобы привязать значение ячейки к элементу Надпись, просто выделите элемент, в строке формул наберите G10 и щелкните Enter.

Настраиваем условное форматирование для выделенной даты

Наконец, добавьте условное форматирование, чтобы выделить даты с событиями в календаре.

Выберите диапазон дат в календаре

Переходим на вкладке Главная в группу Стили –> Условное форматирование –> Создать правило

В диалоговом окне Создание правила форматирования, выберите тип правила Использовать формулу для определения форматируемых ячеек.

Задаем правила выделения как на рисунке

Условное форматирование

Форматируем

Подчищаем рабочий лист, форматируем наш календарь и получаем классную визуализацию.

Оформление календаря

Пример рабочей книги с интерактивным календарем.

If you like to plan ahead and make a weekly or monthly schedule, having a calendar in Excel could be quite useful.

In this tutorial, I’m going to show you how to create a calendar in Excel that automatically updates when you change the month or the year value.

I will show you the exact process to create the interactive monthly and yearly calendar, and I also have these as downloadable Excel files, so that you can use them offline.

You can print these calendar templates and manually create the schedule on paper.

Before I get into the nitty-gritty of making the calendar in Excel, let me show you what the final output would look like.

Click here to download the monthly calendar Excel template

Click here to download the yearly calendar Excel template

Demo of the Interactive Calendar in Excel

Below is an example of the interactive monthly calendar in Excel where you can change the month and year value and the calendar would automatically update (you can also highlight holidays or specific dates in a different color).

Interactive Monthly Calendar in Excel Demo
Interactive Monthly Calendar in Excel

It also highlights the weekend dates in a different color.

Click here to download the monthly calendar Excel template

And on similar lines, below I have the yearly calendar template, where when you change the year value the calendar automatically updates to give you the calendar for that year.

Yearly Interactive Calendar in Excel - Demo
Interactive Yearly Calendar in Excel

The weekend dates are highlighted in a different color and if you have a list of holidays (or important dates such as project deadlines or birthdays/anniversaries), then those holidays are also highlighted in the calendar.

Now let me quickly explain how I have created this calendar in Excel.

Some Pre-requisite Before Creating the Interactive Calnedar in Excel

While most of the heavy lifting in this calendar is done by some simple formulas. you need to have a few things in place before you make this calendar.

Have the Holiday List and Month Names in Separate Sheets

Before starting to make the calendar, you need to have the following two additional sheets:

  1. A sheet where you have a list of all the holidays and the dates on which these holidays occur. You can also use this to add important dates that you want to get highlighted in the calendar (such as birthdays, anniversaries, or project deadlines)
Holidays to highlight in the calendar
Holiday Dates to Highlight in the Calendar
  1. A list of all the month names. This is for the monthly calendar template only, and is used to create a drop-down that shows the month names.
Month Names in a separate sheet
Month names

If you download the calendar template for this tutorial, you will see these two additional sheets.

For the sake of simplicity, I have kept these two sheets separate. If you want, you can also combine and have the holiday dates and the month names on the same sheet.

For this calendar, I have used the holidays in the US. You can change these to your region’s holidays, and even add important days such as birthdays or anniversaries so that they can be highlighted in the calendar.

Holidays highlighted in the monthly calendar
Holidays (and other specified dates) get highlighted in the calendar

The data from this holiday sheet would be used to highlight the holiday dates in the calendar.

Create Drop Down Lists To Show Month Names and Year Values

Since I want this calendar to be interactive and allow the user to select the date and the year value, I will:

  • Have a cell where the user can input the Year value
  • Create a drop-down list that will show the month names from where the user can select the month

Note that the month drop-down list is needed only for the monthly calendar template, as in the yearly calendar template all the months are shown anyway.

Below are the steps to do this:

  1. Enter Year in cell A1 and Month in cell A2
  2. In cell B1, enter the year value manually (I will use 2022 in this example)
Entering Year and Month headers
  1. In cell B2, create a drop down list that shows all the month names. For this, you need to use the names that we already have in the Month Names sheet. Below are the steps to create the drop-down list in cell B2:
    1. Select cell B2
    2. Click the Data tab
    3. In the Data Tools group, click on the Data Validation icon
    4. In the Data Validation dialog box that opens, in the Settings tab, in the Allow options, make sure List in selected
    5. In the Source field, enter =’Month Names’!$A$1:$A$12 (or select the field and then go the Month Names tab and select the month names in column A)
    6. Click OK

The above steps would give you a drop-down list in cell B2, where you can select the month name.

Drop Down list created in cell B2

Now that we have a place to enter the year value and select the month name, the aim here is to create a calendar that would automatically update as soon as we change the month/year values.

So it’s time to go ahead and build that awesome calendar in Excel.

Creating the Monthly Calendar in Excel (that Auto-updates)

You can download this monthly calendar template by clicking here

The first thing I need to build this monthly calendar is to have the weekday names in a row (as shown below).

Enter weekday names in a row

After entering the day name, I’ve also given it a background color and increased the column width a little.

Now it’s time for the formulas.

While I can create one single formula that will give me the values in the calendar grid that I have created, it would become quite big.

So for the purpose of this tutorial, let me break it down and show you how it works.

For the formula to work, I will need two values:

  • The month number for the selected month (1 for Jan, 2 for Feb, and so on)
  • Getting the Weekday value for the first day of the selected month (1 if the month starts on Monday, 2 if it starts on Tuesday, and so on)

Formula to get the month number of the selected month:

=MATCH($B$2,'Month Names'!$A$1:$A$12,0)

Formula to get the weekday value of the first day of the month

=WEEKDAY(DATE($B$1,$M$4,1),2)

I have the output of these formulas in cells M4 and M5 as shown below.

Getting parts of formula in extra cells

Now that I have these values, I will be using these in the main formula that I will be using in the calendar grid.

Below is the formula that will give me the dates in the calendar:

=IF(MONTH(DATE($B$1,$M$4,1)+SEQUENCE(6,7)-$M$5)=$M$4,DATE($B$1,$M$4,1)+SEQUENCE(6,7)-$M$5,"")

This is an array formula, so you just need to enter it in cell D5, and the result would spill automatically to all the other cells in the calendar.

Calendar Formula to get dates in the cell

Note: This formula would only work in Excel for Microsoft 365, Excel 2021, and Excel for the web. This is because it uses the SEQUENCE function, which is a new formula and is not available in the older version of Excel.

In case you’re not using Excel for Microsoft 365 or Excel 2021, you can use the below formula instead:

=IF(MONTH(DATE($B$1,$N$4,1)+(ROW()-5)7+COLUMN()-3-$N$5)=$N$4,DATE($B$1,$N$4,1)+(ROW()-5)7+COLUMN()-3-$N$5,"")

Enter this formula in cell D5, and then copy and paste it for all the other cells in the calendar grid.

The result of the formula is the date serial number, so you may either see a serial number (such as 44562) or a date.

While this is good enough, I only want to show the day number.

Below are the steps to change the format of the cells to only show the day number from the date value:

  1. Select all the cells in the calendar
  2. Hold the Control key and press the 1 key (or Command + 1 if using Mac). This will open the Format Cells dialog box
  3. Select the Numbers tab in the Format Cells dialog box (if not selected already)
Select the Number tab in Format Cells Dilaog box
  1. In the Category options. select Custom
  2. In the Type field, enter d
Enter dd as the cell format
  1. Click OK

The above steps would only display the day number in the calendar.

Monthly Calendar with day numbers d shown in the cells

As I mentioned, I broke down the formula to make it easier for you to understand how it works. In the templates you download, I have used one single formula only to generate the entire calendar.

Adding a Dynamic Title for the Calendar

The next step in making this dynamic calendar would be to add a dynamic title – that would tell us for what month and year does the calendar shows.

While I can see these values in cells P1 and P2, it would be easier if I create a title that shows me the month and year value right above the calendar.

To do this, I have used the below formula in cell D3:

=B2&" "&B1
Adding Header to the calendar

This is a simple concatenation formula that combines the value in cell B2 and cell B1 (separated by a space character)

If you make any changes in the month and year selection, this value would automatically update along with the calendar.

I’ve also done the below cosmetic changes to make it look like a header and align it to the center of the calendar:

  • Select cell D3 and change the color and size of the text and make it bold
  • Center the Text so it appears at the top-center of the calendar (and look like a header of the calendar). To do this:
    • Select cell D3:J3
    • Right click and then click on Format Cells
    • In the Fomat Cells dialog box, click on the Alignment tab
    • Select Center Across Selection option in the Horizontal drop down
    • Click OK
Formatting Calendar Header

Highlight the Weekend Days

This one is simple.

Just select all the days in the calendar which represent the weekend and give it a different color.

Highlighting Weekend Days in the Calendar

In this example, since Saturday and Sunday are weekend days for me, I have highlighted these inner light yellow color

Highlighting Holidays in the Calendar

And the final thing that I want to do in this calendar is to highlight all the days that are holidays in a different color.

As one of the previous steps, we already created a separate holiday worksheet where I listed all the holidays for the current year.

Something as shown below:

Holidays highlighted in the monthly calendar

Below are the steps to highlight all these holiday dates in the calendar:

  1. Select all the cells in the calendar (excluding the day name)
  2. Click the Home tab
  3. In the Styles group, click on Conditional Formatting
Click on Conditional Formatting
  1. In the Conditional Formatting options, click on New Rule
Click on New Rule
  1. In the New Formatting Rule dialog box, select the option – ‘Use a formula to determine which cells to format’
Select Use a formula to determine which cells to format
  1. In the field that shows up, enter the following formula:
=ISNUMBER(VLOOKUP(D5,Holidays!$B:$B,1,0))
Enter the formula to highligth holidays in the calendar
  1. Select the format in which you want to highlight the cell with holiday date (click the Format button to choose the color)
Click the Format button to specify the holiday dates formatting
  1. Click Ok

The above steps apply a conditional formatting rule in the selected cells, where each date in the calendar is checked against the holiday list that we provided.

In case the formula finds a date in the holiday list, it’s highlighted in the specified color, else nothing happens

That’s it!

If you follow the above steps, you will have an interactive dynamic monthly calendar that would automatically update when you make the year and month selection. It would also automatically highlight those dates that are holidays.

Click here to download the monthly calendar Excel template

Creating the Yearly Calendar in Excel (that Auto-updates)

You can download this yearly calendar template by clicking here

Just like the monthly calendar, you can also create a yearly calendar that automatically updates when you change the year value.

The first step in creating the yearly calendar is to create an outline as shown below.

Create an outline for the calendar

Here I have the year value in the first row, and then I have created the monthly grids where I’ll populate the dates for the 12 months. I have also highlighted the weekend dates (for Saturday and Sunday) in yellow.

For the yearly calendar, we don’t need the Month Names sheet, but we would still be using the holiday list in the Holidays sheet to highlight those dates that are a holiday.

Now let’s start building this yearly calendar.

Have Month Names Above Each Month Calendar

For this yearly calendar to work, I will somehow need to refer to the month value in the formulas for that month (i.e. 1 for Jan, 2 for Feb, and so on)

Let me show you a cool trick that will allow me to use the month number but at the same time instead of showing the number show the month name instead

Follow the below steps to do this:

  1. In cell B3, which is the left-most cell above the first month calendar grid, enter 1
Enter 1 in cell B3
  1. With cell B3 selected, hold the Control key and press the 1 key (or Command + 1 for Mac). This will open the Format Cells dialog box
  2. In the Format Cells dialog box, make sure the Number tab is selected
Select Number tab in Format Cells dialog box
  1. Click on the ‘Custom’ option in the left pane
Select Custom option in the Category
  1. In the ‘Type’ field on the right, enter the text “January”
Enter January in double quotes
  1. Click Ok

The above steps format cell B3 to show the full month name. And the good thing about this is that the value in the cell still remains 1, and I can use these values in the formulas.

So while the value in cell B3 is 1, it is displayed as a January.

Pretty Cool… right!

When you do the above, you may see the ## signs instead of the month name. This happens when the cell width is not enough to accommodate the entire text. Nothing to worry about – this will be sorted we align the text in the center (covered next)

You need to repeat the same process for all the months – where you enter the month number in the top-left cell in the above row off the calendar month grid (I,e, 2 in J3 and 3 in R3, and 4 in M12 as so on).

And for all these numbers, you need to open the format cells dialog box and specify the month name for each number.

This is just a one-time setup, and you won’t be required to do this again.

Also, you can reposition the name of the month so that it appears in the center above the monthly calendar grid.

You can do this using the Center Across Selection technique.

To do this:

  1. Select cell B3:H3 (for January Month)
  2. Right click and then click on Format Cells
  3. In the Fomat Cells dialog box, click on the Alignment tab
  4. Select Center Across Selection option in the Horizontal drop down
  5. Click OK
Center across selection

After doing this, the month names will be shown right above the monthly calendar and aligned to the middle.

Month Name shown in the center

You can also format the month name if you want. In the calendar I have made, I made the month name bold and changed the color to blue.

Once you have done this for all the months, you will have the structure in place, and we can go ahead and enter the formulas.

Formulas to Make the Dynamic Yearly Calendar

Similar to the monthly calendar, you can use the below formula for January:

=IF(MONTH(DATE($B$1,$B$3,1)+SEQUENCE(6,7)-WEEKDAY(DATE($B$1,$B$3,1),2))=$B$3,DATE($B$1,$B$3,1)+SEQUENCE(6,7)-WEEKDAY(DATE($B$1,$B$3,1),2),"")

As soon as you enter the formula in cell B5 for January, it will spill and fill the entire grid for the month.

Formula for yearly calendar

And again, since we are using the SEQUENCE formula, you can only use this in Excel for Microsoft 365, Excel 2021, and Excel for the web.

You can use the same formula for other months as well, with one minor change (replace $B$3 with $J$3 for February, $B$3 with $R$3 for March, and so on).

This is because we have the month number for each month in a different cell, and we need to refer to the month value for each month in the formula.

Highlighting Holidays in the Calendar

And the final step of creating this dynamic yearly calendar is to highlight those dates that are holidays (these dates are specified in the holiday worksheet).

Below are the steps to do this:

  1. Select all the cells for the month of January month (B5:H10)
  2. Click the Home tab
  3. Click on Conditional Formatting
Click on Conditional Formatting
  1. Click on New Rule from the options in the drop-down
Click on New Rule
  1. In the New Formatting Rule dialog box, select the option – ‘Use a formula to determine which cells to format’
Select Use a formula to determine which cells to format
  1. In the field that shows up, enter the following formula: =ISNUMBER(VLOOKUP(B5,Holidays!$B:$B,1,0))
Conditional Formatting formula to highlight holidays
  1. Click the Format button to specify the format for the cells (I chose yellow color with red border)
Click the Format button in New Formatting Rule dialog box
  1. Click Ok

The above steps would check all the dates in January and highlight those that are marked as a holiday in the holiday worksheet.

You will have to repeat this process for all the months with one minor change.

In the following formula that we use in conditional formatting, you need to replace cell B5 with the top-left cell reference of that month.

For example, if you are doing it for February, then instead of B5, use J5, and for March, use R5.

Once done, all the holidays will be highlighted in the yearly calendar as shown below.

Holidays highlighted in the yearly calendar

Click here to download the monthly calendar Excel template

Click here to download the yearly calendar Excel template

In the downloadable templates that I have provided, I have made sure that the entire calendar would fit one single sheet when printed.

So this is how you can create an interactive calendar in Excel that automatically updates when you change the month value and the year value.

I hope you found this tutorial useful.

Other Excel tutorials you may also like:

  • Excel Holiday Calendar Template 2021 and Beyond (FREE Download)
  • Calendar Integrated with a To Do List Template in Excel
  • How to Get Month Name from Date in Excel (4 Easy Ways)
  • Excel Holiday Calendar Template 2021 and Beyond (FREE Download)
  • Calculate the Number of Months Between Two Dates in Excel
  • FREE Monthly & Yearly Excel Calendar Template
  • Excel To Do List Template – 4 Examples (FREE Download)

Содержание

  • 1 Создание различных календарей
    • 1.1 Способ 1: создание календаря на год
    • 1.2 Способ 2: создание календаря с использованием формулы
    • 1.3 Способ 3: использование шаблона
    • 1.4 Помогла ли вам эта статья?
    • 1.5 Метод 1 Использование шаблона Excel
    • 1.6 Метод 2 Импорт данных Excel в календарь Outlook
    • 1.7 Интерактивный календарь в Excel
    • 1.8 Создаем таблицу с событиями
    • 1.9 Настраиваем календарь
    • 1.10 Задаем имя диапазону дат в календаре
    • 1.11 Определяем ячейку с выделенной датой
    • 1.12 Добавляем макрос на событие Worksheet_selectionchange()
    • 1.13 Настраиваем формулы для отображения деталей при выборе даты
    • 1.14 Добавление анонса
    • 1.15 Настраиваем условное форматирование для выделенной даты
    • 1.16 Форматируем

как сделать календарь событий в excel

При создании таблиц с определенным типом данных иногда нужно применять календарь. Кроме того, некоторые пользователи просто хотят его создать, и использовать в бытовых целях. Программа Microsoft Office позволяет несколькими способами вставить календарь в таблицу или на лист. Давайте выясним, как это можно сделать.

Создание различных календарей

Все календари, созданные в Excel, можно разделить на две большие группы: охватывающие определенный отрезок времени (например, год) и вечные, которые будут сами обновляться на актуальную дату. Соответственно и подходы к их созданию несколько отличаются. Кроме того, можно использовать уже готовый шаблон.

Способ 1: создание календаря на год

Прежде всего, рассмотрим, как создать календарь за определенный год.

  1. Разрабатываем план, как он будет выглядеть, где будет размещаться, какую ориентацию иметь (альбомную или книжную), определяем, где будут написаны дни недели (сбоку или сверху) и решаем другие организационные вопросы.
  2. Для того, чтобы сделать календарь на один месяц выделяем область, состоящую из 6 ячеек в высоту и 7 ячеек в ширину, если вы решили писать дни недели сверху. Если вы будете их писать слева, то, соответственно, наоборот. Находясь во вкладке «Главная», кликаем на ленте по кнопке «Границы», расположенной в блоке инструментов «Шрифт». В появившемся списке выбираем пункт «Все границы».
  3. Выравниваем ширину и высоту ячеек, чтобы они приняли квадратную форму. Для того, чтобы установить высоту строки кликаем на клавиатуре сочетание клавиш Ctrl+A. Таким образом, выделяется весь лист. Затем вызываем контекстное меню кликом левой кнопки мыши. Выбираем пункт «Высота строки».

    как сделать календарь событий в excel

    Открывается окно, в котором нужно установить требуемую высоту строки. Ели вы впервые делаете подобную операцию и не знаете, какой размер установить, то ставьте 18. Потом жмите на кнопку «OK».

    как сделать календарь событий в excel

    Теперь нужно установить ширину. Кликаем по панели, на которой указаны наименования столбцов буквами латинского алфавита. В появившемся меню выбираем пункт «Ширина столбцов».

    как сделать календарь событий в excel

    В открывшемся окне установите нужный размер. Если не знаете, какой размер установить, можете поставить цифру 3. Жмите на кнопку «OK».

    как сделать календарь событий в excel

    После этого, ячейки на листе приобретут квадратную форму.

  4. Теперь над расчерченным шаблоном нам нужно зарезервировать место для названия месяца. Выделяем ячейки, находящиеся выше строки первого элемента для календаря. Во вкладке «Главная» в блоке инструментов «Выравнивание» жмем на кнопку «Объединить и поместить в центре».
  5. Прописываем дни недели в первом ряду элемента календаря. Это можно сделать при помощи автозаполнения. Вы также можете на свое усмотрение отформатировать ячейки этой небольшой таблицы, чтобы потом не пришлось форматировать каждый месяц в отдельности. Например, можно столбец, предназначенный для воскресных дней залить красным цветом, а текст строки, в которой находятся наименования дней недели, сделать полужирным.
  6. Копируем элементы календаря ещё для двух месяцев. При этом не забываем, чтобы в область копирования также входила объединенная ячейка над элементами. Вставляем их в один ряд так, чтобы между элементами была дистанция в одну ячейку.
  7. Теперь выделяем все эти три элемента, и копируем их вниз ещё в три ряда. Таким образом, должно получиться в общей сложности 12 элементов для каждого месяца. Дистанцию между рядами делайте две ячейки (если используете книжную ориентацию) или одну (при использовании альбомной ориентации).
  8. Затем в объединенной ячейке пишем название месяца над шаблоном первого элемента календаря – «Январь». После этого, прописываем для каждого последующего элемента своё наименование месяца.
  9. На заключительном этапе проставляем в ячейки даты. При этом, можно значительно сократить время, воспользовавшись функцией автозаполнения, изучению которой посвящен отдельный урок.

как сделать календарь событий в excel

После этого, можно считать, что календарь готов, хотя вы можете дополнительно отформатировать его на своё усмотрение.

Урок: Как сделать автозаполнение в Excel

Способ 2: создание календаря с использованием формулы

Но, все-таки у предыдущего способа создания есть один весомый недостаток: его каждый год придется делать заново. В то же время, существует способ вставить календарь в Excel с помощью формулы. Он будет каждый год сам обновляться. Посмотрим, как это можно сделать.

  1. В левую верхнюю ячейку листа вставляем функцию:

    ="Календарь на " & ГОД(СЕГОДНЯ()) & " год" Таким образом, мы создаем заголовок календаря с текущим годом.

  2. Чертим шаблоны для элементов календаря помесячно, так же как мы это делали в предыдущем способе с попутным изменением величины ячеек. Можно сразу провести форматирование этих элементов: заливка, шрифт и т.д.
  3. В место, где должно отображаться названия месяца «Январь», вставляем следующую формулу:
    =ДАТА(ГОД(СЕГОДНЯ());1;1)

    как сделать календарь событий в excel

    Но, как видим, в том месте, где должно отобразиться просто название месяца установилась дата. Для того, чтобы привести формат ячейки к нужному виду, кликаем по ней правой кнопкой мыши. В контекстном меню выбираем пункт «Формат ячеек…».

    как сделать календарь событий в excel

    В открывшемся окне формата ячеек переходим во вкладку «Число» (если окно открылось в другой вкладке). В блоке «Числовые форматы» выделяем пункт «Дата». В блоке «Тип» выбираем значение «Март». Не беспокойтесь, это не значит, что в ячейке будет слово «Март», так как это всего лишь пример. Жмем на кнопку «OK».

  4. Как видим, наименование в шапке элемента календаря изменилось на «Январь». В шапку следующего элемента вставляем другую формулу:

    =ДАТАМЕС(B4;1) В нашем случае, B4 – это адрес ячейки с наименованием «Январь». Но в каждом конкретном случае координаты могут быть другими. Для следующего элемента уже ссылаемся не на «Январь», а на «Февраль», и т.д. Форматируем ячейки так же, как это было в предыдущем случае. Теперь мы имеем наименования месяцев во всех элементах календаря.

  5. Нам следует заполнить поле для дат. Выделяем в элементе календаря за январь все ячейки, предназначенные для внесения дат. В Строку формул вбиваем следующее выражение:

    =ДАТА(ГОД(D4);МЕСЯЦ(D4);1-1)-(ДЕНЬНЕД(ДАТА(ГОД(D4);МЕСЯЦ(D4);1-1))-1)+{0:1:2:3:4:5:6}*7+{1;2;3;4;5;6;7} Жмем сочетание клавиш на клавиатуре Ctrl+Shift+Enter.

  6. Но, как видим, поля заполнились непонятными числами. Для того, чтобы они приняли нужный нам вид. Форматируем их под дату, как это уже делали ранее. Но теперь в блоке «Числовые форматы» выбираем значение «Все форматы». В блоке «Тип» формат придется ввести вручную. Там ставим просто букву «Д». Жмем на кнопку «OK».
  7. Вбиваем аналогичные формулы в элементы календаря за другие месяцы. Только теперь вместо адреса ячейки D4 в формуле нужно будет проставить координаты с наименованием ячейки соответствующего месяца. Затем, выполняем форматирование тем же способом, о котором шла речь выше.
  8. Как видим, расположение дат в календаре все ещё не корректно. В одном месяце должно быть от 28 до 31 дня (в зависимости от месяца). У нас же в каждом элементе присутствуют также числа из предыдущего и последующего месяца. Их нужно убрать. Применим для этих целей условное форматирование.

    Производим в блоке календаря за январь выделение ячеек, в которых содержатся числа. Кликаем по значку «Условное форматирование», размещенному на ленте во вкладке «Главная» в блоке инструментов «Стили». В появившемся перечне выбираем значение «Создать правило».

    Открывается окно создания правила условного форматирования. Выбираем тип «Использовать формулу для определения форматируемых ячеек». В соответствующее поле вставляем формулу:

    =И(МЕСЯЦ(D6)1+3*(ЧАСТНОЕ(СТРОКА(D6)-5;9))+ЧАСТНОЕ(СТОЛБЕЦ(D6);9)) D6 – это первая ячейка выделяемого массива, который содержит даты. В каждом конкретном случае её адрес может отличаться. Затем кликаем по кнопке «Формат».

    В открывшемся окне переходим во вкладку «Шрифт». В блоке «Цвет» выбираем белый или цвет фона, если у вас установлен цветной фон календаря. Жмем на кнопку «OK».

    Вернувшись в окно создания правила, жмем на кнопку «OK».

  9. Используя аналогичный способ, проводим условное форматирование относительно других элементов календаря. Только вместо ячейки D6 в формуле нужно будет указывать адрес первой ячейки диапазона в соответствующем элементе.
  10. Как видим, числа, которые не входят в соответствующий месяц, слились с фоном. Но, кроме того, с ним слились и выходные дни. Это было сделано специально, так как ячейки, где содержаться числа выходных дней мы зальём красным цветом. Выделяем в январском блоке области, числа в которых выпадают на субботу и воскресение. При этом, исключаем те диапазоны, данные в которых были специально скрыты путем форматирования, так как они относятся к другому месяцу. На ленте во вкладке «Главная» в блоке инструментов «Шрифт» кликаем по значку «Цвет заливки» и выбираем красный цвет.

    Точно такую же операцию проделываем и с другими элементами календаря.

  11. Произведем выделение текущей даты в календаре. Для этого, нам нужно будет опять произвести условное форматирование всех элементов таблицы. На этот раз выбираем тип правила «Форматировать только ячейки, которые содержат». В качестве условия устанавливаем, чтобы значение ячейки было равно текущему дню. Для этого вбиваем в соответствующее поля формулу (показано на иллюстрации ниже).

    =СЕГОДНЯ() В формате заливки выбираем любой цвет, отличающийся от общего фона, например зеленый. Жмем на кнопку «OK».

    После этого, ячейка, соответствующая текущему числу, будет иметь зеленый цвет.

  12. Установим наименование «Календарь на 2017 год» посередине страницы. Для этого выделяем всю строку, где содержится это выражение. Жмем на кнопку «Объединить и поместить в центре» на ленте. Это название для общей презентабельности можно дополнительно отформатировать различными способами.

В целом работа над созданием «вечного» календаря завершена, хотя вы можете ещё долго проводить над ним различные косметические работы, редактируя внешний вид на свой вкус. Кроме того, отдельно можно будет выделить, например, праздничные дни.

Урок: Условное форматирование в Excel

Способ 3: использование шаблона

Те пользователи, которые ещё в недостаточной мере владеют Экселем или просто не хотят тратить время на создание уникального календаря, могут воспользоваться готовым шаблоном, закачанным из интернета. Таких шаблонов в сети довольно много, причем велико не только количество, но и разнообразие. Найти их можно, просто вбив соответствующий запрос в любую поисковую систему. Например, можно задать следующий запрос: «календарь шаблон Excel».

Примечание: В последних версиях пакета Microsoft Office огромный выбор шаблонов (в том числе и календарей) интегрирован в состав программных продуктов. Все они отображаются непосредственно при открытии программы (не конкретного документа) и, для большего удобства пользователя, разделены на тематические категории. Именно здесь можно выбрать подходящий шаблон, а если такового не найдется, его всегда можно скачать с официального сайта Office.com.

По сути, такой шаблон — уже готовый календарь, в котором вам только останется занести праздничные даты, дни рождения или другие важные события. Например, таким календарем является шаблон, который представлен на изображении ниже. Он представляет собой полностью готовую к использованию таблицу.

Вы можете в нем с помощью кнопки заливки во вкладке «Главная» закрасить различными цветами ячейки, в которых содержатся даты, в зависимости от их важности. Собственно, на этом вся работа с подобным календарем может считаться оконченной и им можно начинать пользоваться.

Мы разобрались, что календарь в Экселе можно сделать двумя основными способами. Первый из них предполагает выполнение практически всех действий вручную. Кроме того, календарь, сделанный этим способом, придется каждый год обновлять. Второй способ основан на применении формул. Он позволяет создать календарь, который будет обновляться сам. Но, для применения данного способа на практике нужно иметь больший багаж знаний, чем при использовании первого варианта. Особенно важны будут знания в сфере применения такого инструмента, как условное форматирование. Если же ваши знания в Excel минимальны, то можно воспользоваться готовым шаблоном, скачанным из интернета.

Мы рады, что смогли помочь Вам в решении проблемы.

Задайте свой вопрос в комментариях, подробно расписав суть проблемы. Наши специалисты постараются ответить максимально быстро.

Помогла ли вам эта статья?

Да Нет

2 метода:Использование шаблона ExcelИмпорт данных Excel в календарь Outlook

Excel не является программой-календарем, но ее можно использовать для создания и управления календарем. При помощи множества календарных шаблонов вы быстро создадите календарь, что намного проще, чем делать это с нуля. Также в Excel вы можете внести список событий, а затем импортировать его в календарь Outlook.

Метод 1 Использование шаблона Excel

  1. Создайте новую таблицу Excel.

    Нажмите «Файл» или кнопку «Office» и выберите «Создать». Отобразится ряд различных шаблонов.

    • В некоторых версиях Excel, например, в Excel 2011 для Mac OS, вместо «Создать» нажмите «Создать из шаблона».
    • При создании календаря из шаблона вы получите пустую календарную сетку, в которую введете события. Введенные данные не будут преобразованы в календарный формат. Для импорта списка событий, внесенных в Excel, в календарь Outlook перейдите к следующему разделу.
  2. Найдите календарный шаблон.

    В некоторых версиях Excel найдите раздел «Календари»; если такой раздел отсутствует, в строке поиска введите «календарь» (без кавычек). В других версиях Excel календарные шаблоны отображаются (и выделены) на главной странице. Воспользуйтесь одним из предустановленных шаблонов, а если они вам не нравятся, найдите календарный шаблон в интернете.

    • Вы можете найти шаблон конкретного календаря. Например, если вам нужен учебный календарь, в строке поиска введите «учебный календарь» (без кавычек).
  3. Измените даты в календарном шаблоне.

    При выборе шаблона на экране отобразится календарная сетка с датами. Скорее всего, даты не будут совпадать с днями недели, но это корректируется в меню, открывающемся при выборе даты.

    • Процесс изменения даты зависит от выбранного шаблона, но в большинстве случаев нужно выбрать год или месяц, а затем нажать кнопку ▼, которая отобразится возле него. Откроется меню с опциями, при помощи которых можно настроить правильное расположение дат.
    • Для выбора дня, с которого начинается неделя, щелкните по первому дню недели и в открывшемся меню выберите другой день.
  4. Избавьтесь от подсказок. Многие шаблоны имеют текстовые поля с советами о том, как правильно настроить календарь (изменить даты и тому подобное). Если вы не хотите, чтобы такие поля отображались на календаре, удалите их.

  5. Измените оформление календаря. Вы можете изменить внешний вид любого элемента; для этого выберите нужный элемент и внесите изменения на вкладке «Главная». Вы можете изменить шрифт, его цвет и размер и многое другое.

  6. Введите события. По завершении настройки календаря введите события и другую информацию. Для этого щелкните по нужной ячейке и вводите данные. Если в одну ячейку необходимо ввести несколько событий, поэкспериментируйте с разным количеством пробелов.

Метод 2 Импорт данных Excel в календарь Outlook

  1. Создайте новую таблицу Excel. Вы можете импортировать данные Excel в календарь Outlook. Так вы запросто импортируете, например, рабочие графики.

  2. В таблицу добавьте соответствующие заголовки.

    Задача по импорту данных в Outlook намного упростится, если электронная таблица будет иметь соответствующие заголовки. В перовой строке введите следующие заголовки:

    • Предмет (название события)
    • Дата начала
    • Время начала
    • Дата окончания
    • Время окончания
    • Описание
    • Местонахождение
  3. Каждую запись вводите в новой строке.

    Ячейка «Предмет» содержит название события, которое будет отображено в календаре. Не нужно заполнять каждую ячейку, но рекомендуется ввести данные хотя бы в ячейки «Предмет» и «Дата начала».

    • Даты нужно вводить в следующем формате: MM/ДД/ГГ или ДД/ММ/ГГ – только так Outlook правильно интерпретирует даты.
    • Вы можете ввести событие, которое имеет место в течение нескольких дней; для этого введите данные в ячейки «Дата начала» и «Дата окончания».
  4. Откройте меню «Сохранить как». По завершении ввода данных в таблицу Excel сохраните ее в формате, который поддерживается Outlook.

  5. В меню «Тип файла» выберите «CSV (разделители – запятые)». Этот формат поддерживается многими программами, включая Outlook.

  6. Сохраните файл. Введите имя файла и сохраните его в формате CSV. В окне с вопросом, хотите ли вы продолжить, нажмите «Да».

  7. Откройте календарь Outlook. Outlook входит в пакет программ Microsoft Office, поэтому если у вас установлен Excel, то, скорее всего, установлен и Outlook. Запустите Outlook и нажмите «Календарь» (в нижнем левом углу).

  8. Перейдите на вкладку «Файл» и выберите «Открыть и экспортировать». Отобразится список опций для обработки данных Outlook.

  9. Выберите «Импорт/Экспорт». Откроется новое окно, в котором вы можете импортировать/экспортировать данные в/из Outlook.

  10. Выберите «Импорт из другой программы или файла», а затем нажмите «Данные, разделенные запятыми». Вам будет предложено выбрать файл, из которого вы хотите импортировать данные.

  11. Нажмите «Обзор» и найдите CSV-файл, который вы создали в Excel. В большинстве случаев вы найдете этот файл в папке «Мои документы» (если вы не меняли местоположение файлов, заданное в Excel по умолчанию).

  12. В качестве папки назначения выберите «Календарь». Это нужно сделать, так как в Outlook открыт календарь.

  13. Нажмите «Готово», чтобы импортировать файл.

    Данные из таблицы Excel будут преобразованы, и события отобразятся в календаре Outlook. События будут распределены по соответствующим датам и времени. Если в таблицу вы вносили описание какого-либо события, оно отобразится после того, как вы выделите соответствующее событие.

Информация о статье

Эту страницу просматривали 96 265 раза.

Была ли эта статья полезной?

Одним из распространенных способов использования Excel является создание списков событий, встреч и других мероприятий, связанных с календарем. В то время как Excel способен с легкостью обрабатывать эти данные, он не имеет быстрого способа визуализировать эту информацию. Нам потребуется немного творчества, условного форматирования, несколько формул и 3 строки кода VBA, чтобы создать симпатичный, интерактивный календарь. Рассмотрим, как можем все это реализовать.

Я нашел этот пример на сайте Chandoo.org и делюсь им с вами.

Интерактивный календарь в Excel

На выходе у нас должно получиться что-то вроде этого:

Создаем таблицу с событиями

На листе Расчеты создаем таблицу со всеми событиями

Настраиваем календарь

Так как все события происходят в рамках двух месяцев, я просто ввел первую дату первого месяца, протянул вниз и отформатировал так, чтобы было похоже на календарь. На данном этапе он должен выглядеть следующим образом.

Задаем имя диапазону дат в календаре

Это просто, выделяем весь диапазон дат нашего календаря и в поле Имя задаем «Календарь»

Определяем ячейку с выделенной датой

На листе Расчеты выбираем пустую ячейку и задаем ей имя «ВыделеннаяЯчейка». Мы будем использовать ее для определения даты, которую выбрал пользователь. В нашем случае, это ячейка G3.

Добавляем макрос на событие Worksheet_selectionchange()

Описанный ниже код поможет идентифицировать, когда пользователь выбрал ячейку в диапазоне “Календарь”. Добавьте этот код на лист с календарем. Для этого открываем редактор VBA, нажатием Alt+F11. Копируем код ниже и вставляем его Лист1.

1
2
3
4
5

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Application.Intersect(Target, Range(«calendar»)) Is Nothing Then
= ActiveCell.Value
End If
End Sub

Настраиваем формулы для отображения деталей при выборе даты

Изменение даты на календаре ведет за собой изменение 4-х параметров отображения в анонсе: название, дата, место и описание. Зная, что дата находится в ячейке «ВыделеннаяЯчейка», воспользуемся формулами ВПР, ЕСЛИ и ЕСЛИОШИБКА для определения этих параметров. Логика формул следующая: если на выбранную дату существует событие, возвращает данные этого события, иначе возвращает пустую ячейку. Формулы с определением параметров события находятся на листе Расчеты, в ячейках G10:G13.

Добавление анонса

Наконец добавляем в лист Календарь 4 элемента Надпись и привязываем их к данным, находящихся в ячейках G10:G13 листа Расчеты.

Совет: для того, чтобы привязать значение ячейки к элементу Надпись, просто выделите элемент, в строке формул наберите G10 и щелкните Enter.

Настраиваем условное форматирование для выделенной даты

Наконец, добавьте условное форматирование, чтобы выделить даты с событиями в календаре.

Выберите диапазон дат в календаре

Переходим на вкладке Главная в группу Стили –> Условное форматирование –> Создать правило

В диалоговом окне Создание правила форматирования, выберите тип правила Использовать формулу для определения форматируемых ячеек.

Задаем правила выделения как на рисунке

Форматируем

Подчищаем рабочий лист, форматируем наш календарь и получаем классную визуализацию.

Пример рабочей книги с интерактивным календарем.

Author: Oscar Cronquist Article last updated on December 11, 2019

Highlight events in a yearly calendar american holidays

This article demonstrates how to highlight given date ranges in a yearly calendar, this calendar allows you to change the year and the calendar dates change accordingly.

The image above shows an Excel Table to the right of the calendar, you can easily add as many events as you like.

This worksheet uses Conditional Formatting formulas containing structured references pointing to the Excel defined Table, this makes it simple to use because no formulas need to be changed when the list of events grows larger.

Steven asks:
I got 6 events with different dates.
Event — DATE START — DATE END
1
2
3
4
5
6
On sheet 2 I have a Year Calander (365 Days). I need to do apply conditional formatting to highlight the days in which I have events.The six events are just a start and the list will grow longer. I want to have a pictorial view of the calendar on where the events fall in the year which is Sheet2.Sheet1 is just the key in the dates for the start and end.

How to create an Excel Table

Highlight events in a yearly calendar create excel table

The main benefit of converting the data set, in this case, is that the cell references in formulas don’t need to be changed when you add additional date ranges to the Excel Table.

The cell references pointing to an Excel Table are called structured references and are dynamic, they don’t change no matter how many date ranges you add to the Table.

One disadvantage with structured cell references is that you need to apply a workaround in order to use them in Conditional formatting formulas and Drop Down Lists.

  1. Select any cell in your data set.
  2. Press shortcut keys CTRL + T to open the «Create Table» dialog box, see image above.
  3. Press OK button to create the Excel Table.

How to build a dynamic yearly calendar based on input year

Highlight events in a yearly calendar build dates

Here are the steps to create the calendar without dates.

  1. Select cell range B4:H4.
  2. Go to tab «Home» on the ribbon if you are not already there.
  3. Press with left mouse button on «Merge and Center» button.
  4. Type this formula in cell B4: =DATE($K$2,1,1) and press Enter. This will return a date, however, we need only the month name to be displayed.
  5. Select cell B4 and press CTRL + 1 to open the «Format Cells» dialog box.
  6. Select category: Custom and type mmmm.
  7. Press with left mouse button on OK button. This will format the date in cell B4 to only show the month name. This will make the month name dynamic meaning it will change if the Excel user has a different Excel language installed.
  8. Select cell B5 and type Mo and then press Tab key to move to the next cell.
  9. Continue typing Tu, We, Th, Fr, Sa and Su with the remaining cells, see image above.
  10. Press and hold on column header B.
  11. Drag with mouse to column H.
  12. Press and hold on any of the separating lines between the column headers.
  13. Drag with mouse until column width is around 26 pixels, you can change this later.
  14. Release mouse button and all selected columns will have the width 26 pixels.
    Highlight events in a yearly calendar build dates1
  15. Copy cell range B4:H5 and paste to J4:P5.
  16. Change columns widths to 26 pixels.
  17. Enter this formula in cell J4 for February: =DATE($K$2,2,1)
    The only difference between this formula and the formula for January is the month argument which I have bolded in the formula above.
    2 represents February which is the second month.
    Highlight events in a yearly calendar build dates2
  18. Copy cell range B4:X5 and paste to B13:X20.
  19. Change these months as well. March formula: =DATE($K$2,3,1)
  20. Repeat with remaining quarters.
    Highlight events in a yearly calendar build dates3

The week starts with Sunday if you live in the US, the image then looks like this.

Highlight events in a yearly calendar build dates4

Select month names, weekday names and six rows below each month and apply a border to the selected cells.

  1. Go to tab «Home» on the ribbon.
  2. Press with mouse on border button.
  3. Press with mouse on «All borders».

Highlight events in a yearly calendar all borders

This creates a border around each cell.

Highlight events in a yearly calendar all borders1

  1. Select columns B to X.
  2. Go to tab «Home» on the ribbon.
  3. Press with mouse on «Center» button to center cell content.

Highlight events in a yearly calendar center content1

Calendar date formulas

Highlight events in a yearly calendar apply formulas

I center and merged cell range K2:O2 and entered year 2020 as an example, all formulas will be based on this year that is entered in cell K2.

Select cell B6 which is the first cell for the month of January, type the following formula:

=DATE($K$2,1,1)-WEEKDAY(DATE($K$2,1,1),2)+1

This formula calculates the first date in the first week which the first day in January falls, this may be a date in December, however, I will use Conditional formatting to hide dates outside the month later in this article.

The DATE function uses three arguments, year, month and day. DATE(year, month, day)

DATE($K$2,1,1)

becomes

DATE(2020,1,1)

and returns 12/30/2019.

The WEEKDAY function calculates a number based on a date representing the position in a week. WEEKDAY(serial_number,[return_type])

The serial_number argument is the date and the [return_type] argument lets you pick which day the week begins with.  return_type 2 returns 1 for Monday, 2 for Tuesday, 3 for Wednesday, etc.

DATE($K$2,1,1)-WEEKDAY(DATE($K$2,1,1),2)+1

becomes

43831-WEEKDAY(43831,2)+1

1/1/2020 falls on a Wednesday and the WEEKNUM function will then return 3. 3 = Wednesday.

43831-3

and returns

43828 which is 12/29/2019.

Highlight events in a yearly calendar format dates in calendar 1

Copy cell B6 and paste to the first cell in the remaining months, change the number representing the month argument in the formula so it corresponds to the month.

For example, in February the formula becomes:

=DATE($K$2,2,1)-WEEKDAY(DATE($K$2,2,1),2)+1

2 represents February and is bolded in the formula above.

Go back to month January and enter this formula in cell C6:

=B6+1

Copy cell C6 and paste formula to cell range C6:H11. Enter the following formula in cell B7:

=B7+7

Copy cell B7 and paste to cell range B8:B11, month January is now finished. Repeat above steps with the remaining months.

Hide dates

Highlight events in a yearly calendar hide dates

The image above shows the calendar, however, dates that don’t belong to the month are also displayed. This may or may not be what you want, you can hide them using Conditional Formatting or color them differently also using Conditional Formatting.

Select cell range B6:H11, go to tab «Home» on the ribbon. Press with mouse on the «Conditional Formatting» button and then press with left mouse button on «New Rule…», this opens a dialog box.

Highlight events in a yearly calendar hide dates CF formula

Press with mouse on «Use a formula to determine which cells to format», then type this formula:

=MONTH(B6)<>1

Press with mouse on the «Format…» button and a «Format Cells» dialog box shows up. Press with mouse on tab «Font».

Highlight events in a yearly calendar hide dates CF formula format cells 1

Pick font color white, this will make the text hidden. White font against a white background and the entire cell will be white.

Press with left mouse button on OK button and press with left mouse button on the next OK button as well. Then press with left mouse button on «Apply» button.

Highlight events in a yearly calendar hide dates CF formula format cells2

If you want the dates to be shown but not as prominent, use a grey color instead.

Highlight events in a yearly calendar hide dates CF formula format cells3

Apply the same conditional formatting formula to the remaining months, however, change the number so it represents the month number.

For example, Februarys CF formula becomes:

=MONTH(B6)<>2

Highlight events in a yearly calendar hide dates CF formula format cells4

Highlight date ranges in calendar

Highlight events in a yearly calendar highlight events

I will now demonstrate how to apply Conditional Formatting in order to highlight dates based on the events specified in the Excel Table. If you change the year in cell K2 the highlighted dates will change accordingly making the calendar dynamic.

  1. Select all dates in the calendar. Tip! Press and CTRL key and then select the cell ranges. For example. the cell ranges to be selected in the first quarter are B6:H11, J6:P11 and R6:X11.
  2. Go to tab «Home» on the ribbon.
  3. Press with left mouse button on the «Conditional Formatting» button.
  4. Press with left mouse button on «New Rule…»
  5. Press with left mouse button on «Use a formula to determine which cells to format».
  6. Type this formula: =IF(B6=»»,FALSE,SUMPRODUCT((B6>=INDIRECT(«Table1[Start]»))*(B6<=INDIRECT(«Table1[End]»))))
    Highlight events in a yearly calendar highlight events new rule
  7. Press with left mouse button on «Format…» button.
  8. Press with left mouse button on tab «Fill»
  9. Pick a color.
  10. Press with left mouse button on OK button.
  11. Press with left mouse button on OK button.
    Highlight events in a yearly calendar highlight events order CF formulas
  12. Select the CF formula you just now created, press with left mouse button on the arrow keys to move the formula to the bottom of the list.
  13. Press with left mouse button on all checkboxes «Stop If True» so that the last CF formula won’t be rund if any of the other are. This will prevent hidden dates from being highlighted. See image above.
  14. Press with left mouse button on Apply button and then OK button.

Highlight events in a yearly calendar highlight events2

How to change year

You can change the year in cell K2 and the calendar changes almost instantly.

How to add or remove events

The events are in an excel defined table. You can add or remove rows by press with right mouse button oning on a cell and select Insert or Delete.

highlight events in a calendar2

You can also add a blank row by selecting the last cell in the table.

highlight events in a calendar3

Press Tab key.

highlight events in a calendar4

You can move the table to any sheet you like.

test

Calendar – monthly view
This article describes how to build a calendar showing all days in a chosen month with corresponding scheduled events. What’s […]

test

Plot date ranges in a calendar part 2
I will in this article demonstrate a calendar that automatically highlights dates based on date ranges, the calendar populates names […]

test

Shift Schedule
Geoff asks: Hi Oscar, I have a cross reference table we use for shift scheduling. The x-axis is comprised of […]

test

Heat map yearly calendar
The calendar shown in the image above highlights events based on frequency. It is made only with a few conditional […]

test

test

test

Monthly calendar template
The image above shows a calendar that is dynamic meaning you choose year and month and the calendar instantly updates […]

test

Time sheet for work
I have built a sheet to track time at work. It is very simple, there are 13 sheets, one for […]

test

Weekly schedule template
I would like to share this simple weekly schedule I created. How to use weekly schedule Type any date in cell […]

test

Free School Schedule Template
This template makes it easy for you to create a weekly school schedule, simply enter the time ranges and the […]

test

Multi-level To-Do list template
Today I will share a To-do list excel template with you. You can add text to the sheet and an […]

test

Basic invoice template
Rattan asks: In my workbook I have three worksheets; «Customer», «Vendor» and «Payment». In the Customer sheet I have a […]

test

Advanced Gantt Chart Template
This Gantt chart uses a stacked bar chart to display the tasks and their corresponding date ranges. Completed days are […]

test

test

Monthly calendar template #2
I have created another monthly calendar template for you to get. Select a month and year in cells A1 and […]

In this article, you’ll learn how to create a calendar in Excel with step-by-step instructions. We’ve also provided pre-built monthly and yearly calendar templates in Excel and PDF formats to save you time.

Included on this page, you’ll find how to make a yearly calendar in Excel, how to customize your calendar in Excel, and how to insert a calendar into Excel.

How would you like to create your calendar?

Use a pre-built calendar template in Smartsheet

Time to complete: 3 minutes

— or —

Manually create a calendar in Excel

Time to complete: 30 minutes

Smartshee

Download a Monthly or Yearly Calendar Excel Template

2023 Printable Monthly Calendar Landscape

Download 2023 Monthly Calendar Template (Landscape)

Excel | PDF

2023 Printable Monthly Calendar Portrait

Download 2023 Monthly Calendar Template (Portrait)

Excel | PDF

2023 12-Month Calendar Template

Download 2023 Full-Year Calendar Excel Template

How to Use a Monthly or Yearly Calendar Excel Template

Using a calendar template is incredibly easy. All you need to do is choose whether you need a monthly or yearly calendar, and add your scheduled events to the template. You can also customize the font types, font sizes, and colors. If you choose the monthly calendar, you will first need to change the title and the dates for the specific month you want to use. 

Here are more steps for customizing your template for your needs.

1. Formatting the Monthly Calendar Template

  1. To change the title, double-click on the title field, delete the formula, and type the new month.
  2. Then, you will need to re-number the date fields. You can either manually enter the dates, or use the auto-fill feature mentioned in step four of the “How to Make a Monthly Calendar in Excel 2003, 2007 and 2010” section. 

2. Adding Events to the Monthly or Yearly Calendar Template

  1. In either template, double-click on a cell in a date box and enter the event. To enter multiple events on the same day, click on another cell in the date box.
  2. To center the text, click on the cell. Then, in the Home tab, in the Alignment group, click the Center Text icon (it looks like five lines of text that are centered).

Changing Fonts and Colors

  1. Click on the cell with the text you’d like to modify, and in the Home tab, you can change the font type, font size, font color, or make the text bold, italicized, or underlined. 
  2. To change the background color of the weekday header or of an event entry, highlight the cell, click the paint bucket icon, and select the fill color. 

You can also personalize your calendar template by adding a photo, like your company logo. In the Insert tab, click Pictures. Upload the picture you would like to use. The image will be added to your spreadsheet and you can drag it anywhere in the sheet. 

How to Make a Monthly Calendar in Excel 2003, 2007 and 2010

Here are some step-by-step instructions for making a monthly or yearly calendar in Excel. 

1. Add Weekday Headers

First, you’ll need to add the days of the week as headers, as well as the month title. 

  1. Leave the first row in your spreadsheet blank. On the second row, type in the days of the week (one day per cell). 
  2. To format the weekday headers and ensure proper spacing, highlight the weekdays you just typed and on the Home tab, in the Cells group, click Format.  Select Column Width and set the width for around 15-20, depending on how wide you want the calendar. 

2. Add Calendar Title 

  1. In the first blank row, we will add the current month as the title of the calendar using a formula. Click any cell in the first row and in the fx field above the blank row, enter =TODAY(). This tells Excel you want today’s date in that field. 
  1. You’ll see the format of the date is incorrect. To fix this, click the cell with the date. In the Home tab, in the Number group, click the Date drop-down. Select More Number Formats and choose the format you would like for the month title.
  2. To center the title, highlight all the cells in your title row (including the one with the month displayed) and click on the Merge and Center button in the Home tab.
     

3. Create the Days in the Calendar 

Here is where you will build the body of your calendar. We will use borders to create the date boxes. 

  1. First, highlight your whole spreadsheet. 
  2. Click the paint bucket icon in the Home tab and select white. Your spreadsheet should now have a white background.
  1. Then, highlight five or six cells under the first weekday header, Sunday.
  1. While the cells are still highlighted, click the borders icon in the Home tab and select the outside borders option. This will outline the first date box in the row.
  2. Highlight the box you just made, and copy and paste it under the other weekday headers. This duplicates your box for the other days in the week. 
  3. Do this for five total rows in your sheet. The calendar should look like this:

To add borders around the weekday headers, highlight the row with the weekdays, click the borders icon, and choose the all borders. 

4. Add Dates 

We’ve created the framework for the calendar, now it’s time to add the dates. You can either manually enter the dates in each box, or use Excel’s auto-fill feature. Here’s how:

  1. For each row in the calendar, enter the first two dates of that week in the first cells in each box. For example, if the 1st of the month is Wednesday, enter 1 into the first Wednesday box and 2 in the Thursday box. 
  2. Then, hold down Shift and highlight both cells with the numbers.
  3. Drag the bottom right corner of the highlighted cells to auto-fill the rest of the week.
  4. Repeat for the whole month. 

Note: You must manually enter the first two dates for each row before you can drag and auto-fill the rest of the week. 

How to Make a Yearly Calendar in Excel

You have essentially created a monthly calendar template. If you want to use a calendar solely on a month-by-month basis, you can use this same calendar, change the month title, and just re-number the days. 

You could also use this monthly calendar framework to create a yearly calendar. 

  1. On the bottom of the spreadsheet, right-click on the tab that says Sheet1.
  2. Click Move or Copy.
  3. Select the box for Create a copy and click OK.
  1. Make a total of 12 copies, one for each month of the year. Note: for months with 31 days, you will need to add an extra row to the calendar.

Once you have 12 copies, you will have to go through each one and change the title to the appropriate month. You’ll also have to re-number the calendar according to the specific month, either manually changing the dates or using the auto-fill feature mentioned in step four of the “How to Make a Monthly Calendar in Excel 2003, 2007 and 2010” section. 

Customize Your Calendar in Excel

It’s easy to customize your monthly or yearly calendar in Excel. You can color-code certain events on the calendar, like meetings or birthdays, or change font sizes. You can even add your company logo to the calendar. 

1. Format Fonts 

  1. To make the title bigger, click the row with the title. In the Home tab, you can change the font type, font size, and make the title bold, italicized, or underlined. 
  2. To change the font size of the weekday headers, highlight all the headers. In the Home tab, you can format the font type and size. 
  1. To format the date markers, highlight all the date boxes. In the Home tab, you can adjust the font type and size. 

2. Change Colors

You can change the font colors or the background colors in your calendar. Color-coding may be especially helpful for labeling certain types of events.

  1. To change the title color, click on the row with the title. In the Home tab, select the color you want from the color drop-down list. 
  2. To change the background color of your weekday header, highlight the whole row,  click the paint bucket icon, and select the fill color. You can also just change the text color by repeating step one. 
  3. To color code an event, type an event or appointment into a date box. Then, select the text, click the paint bucket icon, and select the fill color.

3. Add a Photo

Personalize your calendar by adding images, like your company logo.

  1. In the Insert tab, click Pictures. Upload the picture you would like to use.
  2. The image will be added to your spreadsheet and you can drag it anywhere in the sheet. 

If you would like to add your logo or picture to the top of the calendar, you will have to add extra space so the image can fit. 

  1. Right-click the first row, with your title, and select Insert
  2. Click Entire Row
  3. Repeat depending on how many extra rows you want. 
  4. To make the background of the new rows white, highlight the new rows, click the paint bucket icon, and select white. 
  5. To remove the grid line above the title row, select the title row, click the grid icon, and click the option with the removed gridlines. 

Your customized, formatted calendar can be a challenge to print. The sides of the calendar extend beyond a printable page, so you will end up with parts of a calendar printed on two pages. Here’s how to fix it:

  1. In the Page Layout tab, click Orientation > Landscape
  1. In the Scale to Fit group, change the width to 1 page and the height to 1 page.

Now, your calendar will print on one page.

How to Find a Microsoft Calendar Template

Microsoft has also created a handful of calendar templates. You can choose from a multi-page calendar, a yearly calendar, a weekly calendar, and more. 

Here’s how to use a pre-made template available in Excel:

  1. Click File > New. 
  2. Type Calendar in the search field. 
  3. You’ll see a variety of options, but for this example, click the Any year one-month calendar and click Create

You’ll see a table on the right with Calendar Month, Calendar Year, and 1st Day of Week

  1. Select the cell that says January and click the arrow that appears. In the drop-down menu, select the month for your calendar. 
  2. Enter the calendar year in the cell underneath the month. 
  3. Select the cell that says Monday and click the arrow that appears. In the drop-down menu, select the first day of the month. 

You can also visit Microsoft’s online template gallery by clicking here, and selecting the calendars category on the left-hand side.

How to Insert a Calendar with Visual Basic

You can insert a pre-made, pre-populated calendar directly into Excel using the CalendarMaker with the Visual Basic Editor. You will need to enable the Developer Mode in Excel, and use a programming language, but it is simple to do and Microsoft offers a sample code for you to use. 

1. Enable Developer Mode 

First, you’ll need to turn on the Developer Mode. 

  1. Click File > Options
  2. In the pop-up box, on the left-hand side, click Customize Ribbon.
  3. Under Main Tabs, make sure the Developer box is checked. 

You will now see a new tab in your Excel ribbon at the top of the spreadsheet.

2. Insert the Calendar with the Visual Basic for Applications Code 

Microsoft has a sample Visual Basic for Applications code here for you to use and create the calendar. 

  1. Create a new workbook. 
  2. In the Developer tab, click Visual Basic
  3. You will see a list of workbooks and sheets (under VBAproject on the left side). Find the Sheet1 entry and double-click. 
  4. A blank pop-up box will appear. Copy and paste the Visual Basic for Applications code (found here) into the box.
  1. In the File menu, click Close and return to Microsoft Excel
  2. Go back to the Developer tab and click Macros.
  3. Select Sheet1.CalendarMaker and click Run
  4. In the pop-up box, type the full month and year you want for your calendar and click OK. Your calendar should look like this: 

Smartsheet

How to Make a Calendar in Minutes with Smartsheet’s Calendar Template

Try Smartsheet for Free

Smartsheet’s pre-formatted templates allow you to instantly create a calendar. Months, days of the week, and dates are pre-formatted, and you have room to add descriptions, comments, and duration in hours of each activity. 

Here’s how to use a calendar template in Smartsheet: 

1. Choose a Calendar Template 

  1. Go to Smartsheet.com and log in to your account (or start a free 30-day trial).
  2. From the Home screen, click + icon and type Calendar in the search bar. 
  3. You’ll see a handful of results, but for this example, click on Calendar by Day and click on the blue Use button. 

Calendar Solution Center Smartsheet

2. List Your Calendar Information 

A pre-made template will open, complete with the months and dates already formatted for the entire year. There will also be sample content filled in for reference. 

  1. Add your calendar events under the Activity column. You can also add more detail in the Description, Hours, and Comments columns. 
  2. To add multiple events for the same date, you must create a new row. Right-click on a row and select Insert Row Above or Insert Row Below. Then, in this new row, add the month, day of the week, date, and activity.
  3. If you need to delete a row, right-click on the cell in the row you’d like to delete and select Delete Row

Smartsheet Calendar in Grid View

On the left side of each row, you can attach files directly to a task or start a comment around a certain event, adding more context to your calendar. 

3. Switch to Calendar View

All your calendar information lives in this table. Then, with the click of a button, you can see all the information auto-populated into a calendar. 

  1. On the toolbar, switch to Calendar View

You will now see all your information in a calendar (today’s date will be outlined in blue). You can edit or add an event directly from this calendar view, or change the color of an event, by double-clicking on a blue bubble. 

Smartsheet Calendar View

Anything you change in this calendar view will be automatically updated in your table.

Share your calendar with colleagues, friends, or family. You can choose from printing, exporting, or emailing your calendar from Smartsheet. 

To email your calendar: 

  1. Above the toolbar, click File.
  2. Select Send as Attachment.
  3. In the To field, add the recipient(s). Choose from your contact list or type email addresses.
  4. The Subject and Message fields are auto-populated for you, but you can choose to delete the text and add your own. 
  5. Choose whether to attach the calendar as a PDF or Excel sheet, and whether you want to send the calendar right away or on a recurring basis. 

Send Calendar as Attachment Smartsheet

To share your calendar with a link:

  1. On the toolbar, click on the calendar icon.
  2. Select the publishing option you would like by clicking the slider.
  3. A pop-up box will appear with a publish link. You can copy and paste the link for anyone to view the calendar or use the embed code to embed the calendar into any webpage. 

Publish Smartsheet Calendar

To print your calendar:

  1. On the toolbar, click the printer icon. 
  2. Choose the calendar date range, paper size, orientation, and more. Then, click OK
  3. A PDF version of your calendar will begin downloading. You can then print this PDF.

Learn more about working in Smartsheet’s dynamic calendar view and get started today.

Improve Planning Efforts with Real-Time Work Management in Smartsheet

From simple task management and project planning to complex resource and portfolio management, Smartsheet helps you improve collaboration and increase work velocity — empowering you to get more done. 

The Smartsheet platform makes it easy to plan, capture, manage, and report on work from anywhere, helping your team be more effective and get more done. Report on key metrics and get real-time visibility into work as it happens with roll-up reports, dashboards, and automated workflows built to keep your team connected and informed.

When teams have clarity into the work getting done, there’s no telling how much more they can accomplish in the same amount of time. Try Smartsheet for free, today.

One of the popular uses of Excel is to maintain a list of events, appointments or other calendar related stuff. While Excel shines easily when you want to log this data, it has no quick way to visualize this information. But we can use little creativity, conditional formatting, few formulas & 3 lines of VBA code to create a slick, interactive calendar in Excel. Today, lets understand how to do this.

But first, a reminder to join my Advanced Excel masterclass in USA

As you may know, I am running my first ever Advanced Excel & Dashboards Masterclass in USA this summer (May / June 2013). We will be doing 2 day interactive sessions on Excel, advanced Excel, interactive charts, pivot tables & dashboards in Chicago, New York, Washington (DC) & Columbus (OH). If you live near any of these cities and want to become awesome in Excel, please consider enrolling in my Masterclass.

Click here for details & to book your spot | Download Masterclass brochure

Back to the interactive calendar

Coming back to our topic at hand – interactive calendar, what do we mean by this?

Well, something like below:

Interactive Event Calendar in Excel - Demo

How to create an interactive calendar from a set of events

1. Collect all the event data in a table

Just enter event data in a table like below:

Interactive calendar - event data

2. Set up a calendar in a separate rate

If your events span several months, then you can use formulas to generate calendar.

In my case, all the events (Masterclass sessions) are in May & June 2013. So I just entered date of May 1st in a cell, dragged it sideways and then re-arranged the cells to make it look like a calendar. At this stage, the calendar should look like this:

set up a blank calendar first - Interactive calendar

3. Name the calendar range

This is simple. Select all the cells in calendar range and give a name to it. I called mine “calendar”.

4. Assign a cell for identifying which date is selected

Select a blank cell in your workbook, give it a name like “selectedCell”. We will use this to identify which date is selected by user.

5. Write Worksheet_selectionchange() event

This will help us identify when user selects a cell in “calendar” range. The below 3 line VBA should do. Please attach it to the sheet where your calendar is.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    If Not Application.Intersect(Target, Range("calendar")) Is Nothing Then
       [selectedCell] = ActiveCell.Value
    End If
End Sub

Tutorial: Showing details when user selects a cell

6. Set up the formulas to show details when a valid date is selected

Lets say, each event has 4 details associated with it – title, date, venue & description.

Now, we need to show details of the event when user selects a date in the calendar. Since the selected date is in “selectedCell”, we can use VLOOKUP, IF, IFERROR formulas to do this:

  • Fetch event title in a cell if date selected has an event in it. Else keep it blank
    • =IFERROR(VLOOKUP(selectedCell, table_of_events, event_title_column, false),"")
  • Fetch rest of event details, but keep them blank if date has no events.

Lets say these 4 details are fetched to cells D1, D2, D3 & D4 cells.

7. In calendar sheet, add 4 text boxes and assign them to cells

Finally, in calendar sheet, add 4 text boxes. Assign them to D1, D2, D3 & D4 cells. Arrange and format them as you fancy.

Tip: to assign a cell to text box, just select the text box, go to formula bar and type =D1 press enter.

8. Set up conditional formatting to highlight selected dates

Finally, add a simple conditional formatting rule to highlight the selected dates in calendar. This is simple. Assuming calendar starts at cell A1,

  • Select the calendar range
  • Go to conditional formatting
  • Add new rule
  • Select rule type as “Use a formula to determine which cells to highlight”
  • type the rule as =A1=selectedCell
  • Set up formatting

PS: in my data above, I have used different formula as we need to highlight 2 dates of a Masterclass even when 1 is selected.

Tip: Introduction to conditional formatting.

9. Clean up and formatting

Clean up your worksheets and format the calendar so that it looks gorgeous. And you are done!

Finalized Interactive calendar

Download Interactive Calendar Example file

Click here to download interactive calendar example file and play with it to understand this better.

Examine the formulas in “Calcs” sheet & VBA code so that you can see how this is weaved.

Work with calendar data often, then you are in luck

If you use calendar data often and are looking for some inspiration, ideas & examples on how to represent it, then check out below examples:

  • Employee vacation tracker & dashboard
  • Creating perpetual calendar & event tracker in Excel
  • Interactive pivot table calendar & chart in Excel
  • Creating an interactive picture calendar
  • Employee shift calendar template
  • Annual goals tracker

Do you like the interactive calendar?

I often use interactive calendars in my dashboards & client projects. Since calendars are very natural way to understand events, they work really well.

What about you? Do you use calendars often? How do you like the above technique? Please share your thoughts & ideas using comments.

PS: And if you are waiting to become awesome in Excel, then wait no more. Book your spot in my upcoming Masterclass. Click here.


Share this tip with your colleagues

Excel and Power BI tips - Chandoo.org Newsletter

Get FREE Excel + Power BI Tips

Simple, fun and useful emails, once per week.

Learn & be awesome.




  • 39 Comments




  • Ask a question or say something…




  • Tagged under

    advanced excel, calendar, Charts and Graphs, countifs, downloads, dynamic charts, iferror, macros, masterclass, Microsoft Excel Conditional Formatting, Microsoft Excel Formulas, screencasts, tables, VBA, vlookup




  • Category:

    Charts and Graphs, Learn Excel, VBA Macros

Welcome to Chandoo.org

Thank you so much for visiting. My aim is to make you awesome in Excel & Power BI. I do this by sharing videos, tips, examples and downloads on this website. There are more than 1,000 pages with all things Excel, Power BI, Dashboards & VBA here. Go ahead and spend few minutes to be AWESOME.

Read my story • FREE Excel tips book

Advanced Excel & Dashboards training - Excel School is here

Excel School made me great at work.

5/5

Excel formula list - 100+ examples and howto guide for you

From simple to complex, there is a formula for every occasion. Check out the list now.

Calendars, invoices, trackers and much more. All free, fun and fantastic.

Advanced Pivot Table tricks

Power Query, Data model, DAX, Filters, Slicers, Conditional formats and beautiful charts. It’s all here.

Still on fence about Power BI? In this getting started guide, learn what is Power BI, how to get it and how to create your first report from scratch.

A smart technique to simplify lengthy nested IF formulas in Excel

  • Excel for beginners
  • Advanced Excel Skills
  • Excel Dashboards
  • Complete guide to Pivot Tables
  • Top 10 Excel Formulas
  • Excel Shortcuts
  • #Awesome Budget vs. Actual Chart
  • 40+ VBA Examples

Related Tips

39 Responses to “How to create interactive calendar to highlight events & appointments [Tutorial]”

  1. Fezile says:

    Awesome
    How do you deal with more than 1 calendar entry on a specific day?

    • SA says:

      That’s weird no one replied. I’d really like to know how to work around this as well.

    • MCHAP says:

      Would love to know this, also, if possible.

      • MCHAP says:

        Could we just lookup to the 2nd, 3rd, or 4th occurrence of a lookup and have the selection fill multiple cells at once?

  2. dz says:

    Calcs:G12 presents the dates better as: =IFERROR(TEXT(MIN(I3:I4),»d,»)&TEXT(MAX(I3:I4),»d mmm»),»»)

  3. Love the aesthetics. Is Segoe UI the best font or what?

    • Thank you.. Yes, I too think Segoe UI light is one of the best.

  4. Chandoo,
    This is a very good implementation and use case of interactive calendars. In my templates, so far, I have used dynamic calendars but not interactive ones. One is a Calendar template for customizable printable calendars and the other is a Task Manager template where I used a mini calendar. 
    Is there a way to identify the selected cell without the VBA code?
    Thanks,

  5. CC says:

    Love this one! This may have already been shown somewhere, but how could I add to this by having the calendar highlight dates that had some event connected with them? So, in the little mini-calendars, if there was some event on May 1, it might have a light yellow background, or be bold. I’d click on the date to see the details of the event, but it would be nice to see at a glance which dates were ‘filled’.
    Thanks for a GREAT site!

     
    CC

    • @CC… welcome to Chandoo.org and thanks for your comments.

      To fill up dates with events associated with them, I used conditional formatting.

      1. Lets call the dates on which events are mapped as lstDates
      2. Now, select the small calendar (say B1:G6), from Home > Conditional formatting > New rule
      3. Set the rule type as «use a formula to determine…»
      4. Type the rule =countif(lstDates,B1)>0
      5. Set up formatting

      This will highlight all dates on which there are events in different format. To know more about conditional formatting visit below pages.

      http://chandoo.org/wp/2009/03/13/excel-conditional-formatting-basics/
      http://chandoo.org/wp/tag/conditional-formatting/

  6. CC says:

    That worked perfectly, thanks so much!

  7. JohnC_UK says:

    Chandoo you really do present some very clever techniques and I’m learning a lot from your site.
    A little bugette/feature in this sample though…
    1. Change the dates for the New York events to 1st / 2nd June in the hidden calcs sheet.
    2. Click the green June 2013 calendar caption.
    June 1st / 2nd are highlit (as the green caption also has the date 1/6/13.)
    There are two ways to avoid this.
    1. Change the range for the calendar named range to two regions of the calendar days. (=calendar!$B$7:$H$11,calendar!$B$14:$H$18)
    2. Make the calendar days unlocked and de-select the option «Select locked cells» when you protect the calendar work sheet.
    I prefer option 1 as it is cleaner and defines exactly which cells you are interested in tracking.
    i know you know this but I just thought I’d point it out for people who read your site. (That’s how I’m learning Excel!!! — by others posting examples based on their own experience.)

  8. JohnC_UK says:

    Chandoo
    To clarify my previous post.
    It was not a nit-picking, point scoring post to try and point out a «bug».
    It’s just that I have 24 years of computer programming experience which makes me instinctively test worste case scenarios. That’s what led me to this observation.
    However, as far as Excel goes I’m nowhere near competent and I do appreciate that you and lots of the posters on your site make my Excel skills look like a beginner!!!
    My advice is to always try and think of extreme examples and see if your spreadsheet copes with it.

  9. Anil J says:

    Chandoo,
    Awesome. But I found a small problem, when I selected 31, the Details block showing the dates as «31-30 May». Please correct it.

  10. Joe says:

    Perfect thank you!

  11. Herman says:

    Bravo Chandoo!!! After reading this article and another one (perpetual calendar) from you, I think that it would be great if you could combine both ideas to make an interactive perpetual calendar. Do you think it is possible!?

  12. Shirley Poehlman says:

    I have to say that for the past couple of hours i have been hooked by the amazing posts on this site. Keep up the great work.

  13. Ranjit says:

    Hi Chandoo

    VBA was really good,

    Thank you,

  14. Somendra Misra says:

    the VBA code is working well on Office 2010, but is not working on Office 2011 for MAC OS X. Any idea?

  15. Danilo says:

    When I try save the spreadsheet show this message: «The following features cannot saved in macro-free workbooks.»

  16. WimpieO says:

    I am working in excel 2010and would love to download your example file is i can not seem to get steps 6 & 7 figured, any help with this or a more in depth explanation will be greatly appreciated

  17. […] Sounds like a very interesting project. Maybe check out this tutorial to get your creative juices flowing Chandoo.org […]

  18. Ceetoo says:

    Hello Chandoo…
    can I get a video for this pls? or a more detailed instructions on what to do. I am new to excel but I have a task to do this.

  19. Josh says:

    Any chance something like this could be worked into google’s spreadsheet and calendar programs? I use google spreadsheets for work so that other employees can view and Id love to be able to transfer that info into google calendar so myself and other employees can view past info. Thanks

  20. Ronnie Fisher says:

    Can someone assist me in creating one of these interactive calendars for 2015. I need a very comprehensive calender. My calender need to be from January 1, 2015 to December 31, 2015. I can have up to 200 events on one day. My event data table is big.

    Thank You in advance.

    Ronnie

  21. Juan says:

    what about if I have multiple events in the same day?

  22. Dwayne says:

    As others have said, I need to display multiple events on the sameday. How can I add more than 1 event and have the calendar cover a full 12 months.

    Great site by the way. So much to learn

      • Dwayne says:

        Hi Hui

        Thanks for providing the link for me. I think this is exactly what I am looking for.

        Thanks Hui

        Cheers
        Dwayne

  23. Sharif says:

    Thank you for the calendar link. It’s what I have been looking for.
    I’ve followed the link and entered multiple events per calendar day. However, the calendar displays only the one event per calendar date. What I am doing wrong? Appreciate guidance.

    Regards,
    Sharif

  24. Rose Torres says:

    Chandoo, first thank you for all this help you are giving in excel. Next this calendar is amazing but would you be able to help me in expanding the formula? I have several events on the same day and some events last 5 days. Would you be able to help with this?

  25. Cynthia says:

    Super helpful content here, interested if anyone has cracked adding multiple events on the same date?

  26. PARUL says:

    HI,

    I am unable to download the sample file for this.
    Showing an error

    «ERROR

    The request could not be satisfied.

    CloudFront attempted to establish a connection with the origin, but either the attempt failed or the origin closed the connection.
    Generated by cloudfront (CloudFront)
    Request ID: lu9bM7F40-z_3SwKR9w1yHHR42qSR4vGQ1r57orOyitiNqkcJR9qqQ==»

    Could you please help me with the same through emailing a copy of it.

    Thanks
    Parul

  27. Lau says:

    Hello ! I am trying to proceed as you explained but when I do the formula. =IFERROR(VLOOKUP(selectedCell, table_of_events, event_title_column, false),»»)

    It tells me the error #NAME. Could someone please advise on this error ?

    I have a calendar, the selected cells that display the selected date on the calendar. I have put the formula in a random cell and I selected

    =IFERROR(VLOOKUP(selectedCell, table array were to look for the same value as selected cell; column number were the data I want to return is; false);»»). I do not know what is the wrong thing …
    However, if I let the , instead of the ; then it returns me an empty cell even though there is somethint happening on that day …

    I do not know what to do, I spent the whole day on this error….

    If someone could advise me please.

    My table is on the same sheet as my calendar.
    4 columns: Date, country, site nb and patient nb.
    I want that it returns the patient nb.
    The date column is the first of the array in case.

    Thank you for your support.

  28. Lau says:

    To correct my comment: Name was because I did not put the «» before and after a word. To know if the formula was working or not I have pur for the IFERROR to return «ERROR» if it does not find the date in the array.

    When selecting everything for the VLOOKUP fonction I get the ERROR, however I have something on that day.

    Could someone please advise ?

    Thank you for your support

  29. john batcha says:

    You are simply a wow man!!!

  30. Ruth says:

    Any word on how to add multiple events to the same day?

  31. Jeni says:

    I have the conditional formatting to highlight dates of events, =COUNTIF(lstDates,B7)>0
    But i need to color code events by the type of event. What would I need to do to include a second criteria? I already have the criteria (type) in my table .

Leave a Reply

A calendar in Microsoft Excel comes in handy if you’ve a busy schedule. Although an Excel calendar is an outstanding tool that can assist you to stay prepared when it comes to vital events, appointments, activities, meetings, etc. Therefore, today we are here to discuss how to create calendar in Excel or how to insert calendar in Excel effortlessly.

So, without any further ado, let’s get started…

To repair corrupt Excel file, we recommend this tool:

This software will prevent Excel workbook data such as BI data, financial reports & other analytical information from corruption and data loss. With this software you can rebuild corrupt Excel files and restore every single visual representation & dataset to its original, intact state in 3 easy steps:

  1. Download Excel File Repair Tool rated Excellent by Softpedia, Softonic & CNET.
  2. Select the corrupt Excel file (XLS, XLSX) & click Repair to initiate the repair process.
  3. Preview the repaired files and click Save File to save the files at desired location.

If you want to keep your data in a more organized way then a proper calendar system is very important for the right time management. Luckily Excel offers different ways to create calendars. Let’s know about each of them one by one in detail.

Method 1: Insert Calendar In Excel Using Date Picker Control

Well putting the drop-down calendar in Excel is quite easy to do but just because the time and date picker control are hidden so many users don’t know where it actually exists.

Here is the complete method to create a calendar in Excel perform this task step by step:

Note: Date Picker control of Microsoft works Microsoft’s very smoothly in the Excel 32-bit versions but not in Excel 64-bit version.

  1. Enable The Developer Tab on Excel ribbon.

Excel date picker control actually belongs to the ActiveX controls family, which comes under the Developer tab. Though this Excel Developer tab is kept hidden you can enable its visibility.

  • On the Excel ribbon, you have to make a right-click, and after that choose the option Customize the Ribbon…. This will open the Excel options.
  • From the opened window go to the right-hand side section. Now from customizing the ribbon section, you have to select the Main Tabs. In the appearing main tab list check the Developer box option and then click the OK button.

Date Picker control 1

Also Read: How to Create a Flowchart in Excel? (Step-By-Step Guide)

  1. Insert The Calendar Control

Well, the Excel drop-down calendar is technically known as Microsoft Date and Time Picker Control.

To apply this in the Excel sheet, perform the following steps:

  • Hit the Developer tab and then from the Controls group, you have to make a tap over arrow sign present within the Insert tab.

Now from the ActiveX Controls choose the “More Controls” button.

Date Picker control 2

  • From the opened dialog box of More Controlsselect the Microsoft Date and Time Picker Control 6.0 (SP6). After that click to the OK

Date Picker control 3

  • Hit the cell, in which you have to enter the calendar control.

You will see that a drop-down calendar control starts appearing on your Excel sheet:

Date Picker control 4

Once this date picker control is been inserted, you will see that the EMBED formula starts appearing within the formula bar.

This gives detail to your Excel application about what kind of control is embedded within the sheet. You can’t change edit or delete this control because this will show the error “Reference is not valid“.

Adding the ActiveX control such date picker automatically enables the design mode which will allow you to change the properties and appearance of any freshly added control. The most obvious modification that you need to make at this time is resizing the calendar control and then linking it back to any specific cell.

For activating the Excel drop-down calendar option, hit the Design tab, and then from the Controls group, disable the Design Mode:

Date Picker control 5

  • Now, make a tap over the drop-down arrow for showing up the calendar and then select the date as per your need.
  • Click the dropdown arrow to show the calendar in Excel and choose your desired date.

Date Picker control 6

Note:

If MS date picker control is now not available within the list of More Controls. This situation mainly arises due to the following reasons.

  • While you are running the MS Office 64 bit version. As there is no official date picker control available in the Office 64-bit.
  • Calendar control i.e mscomct2.ocx is now not present or it is not registered on your PC.
  1. Customize Calendar Control

After the addition of the calendar control on your Excel sheet, now you have to shift this calendar control on the desired location and then resize it to get an easy fit within a cell.

  • For resizing this date picker control, you have to enable the Design Mode after that drag this control from the corner section:

Date Picker control 7

Or else you after enabling the Design Mode on, from the calendar control group choose the Properties tab:

Date Picker control 8

  • From the opened Properties window, you have to set the desired width, height, font size and style:

Create Calendar In Excel

  • To shift the Excel date picker control, place your mouse pointer over that and when the cursor changes into a four-pointed arrow sign, just drag the object wherever you want to place it.

Date Picker control 10

  1. Link Excel Calendar Control With The Cell

After successfully adding the calendar drop-down in excel, you need to link it with some specific cell. This step very compulsory to perform if you want to make use of any selected dates with the formulas.

Suppose you are writing the formula for counting up the order’s number between any specific dates. For stopping any other from entering wrong dates such as 2/30/2016 you have inserted a drop-down calendar within 2 cells.

The COUNTIF formula that you have applied for calculating a number of orders will return the value “0” even if the orders are present.

Date Picker control 11

Well, the main reason can be that your Excel is unable to recognize the value present in the date picker control. This problem will persist until you link the control with some specific cell. Here is the step that you need to perform:

  1. Selecting the calendar control you have to enable the Design Mode.
  2. Go to the Developer tab and then from the control group tap to the
  3. In the opened Properties” windows, assign cell reference in the LinkedCell property (here I have written A3):

Create Calendar In Excel

If Excel shows the following error Can’t set cell value to NULL…” then click the OK button to ignore this.

After selecting the date from the drop-down calendar, the date will immediately start appearing in the linked cell. Now excel won’t face any issue in understanding the dates and the formula referencing done in the linked cells will work smoothly.

Create Calendar In Excel

If you don’t need to have extra dates then link the date picker control with the cells where they are present.

Also Read: 4 Ways To Create Drop-Down List In Excel

Method 2: Using Excel Calendar Template

In Excel, there are handy graphic options with the clipart, tables, drawing tools, charts, etc. Using these options one can easily create a monthly calender or weekly calendar with special occasion dates or photos.

So go with the Excel calendar template which is the fastest and easiest way to create calendar in Excel using worksheet data.

Here are the steps to create calendar from Excel spreadsheet data using the template.

  • Click the FileNew after that in the search box you have to type “calendar”.
  • Excel will make search thousands of online templates and then shows you the selected calendar templates which are grouped into the following categories.

Create Calendar In Excel

  • Choose the calendar template as per your requirement, and then tap to the Create.

excel calender template 2

That’s all you need to do…!

Excel calendar template will be opened from the new Excel workbook and then print or customize as per your need.  Usually, Excel weekly calendar templates are set with a year, whereas in some templates you can set a day for starting a week.

Note: for displaying always the current year in your excel calendar just assign a simple formula like this in the cell of the year: =YEAR(TODAY())

Create Calendar In Excel

In this way, you can easily insert the drop-down calendar. Also, you can make a printable Excel calendar.

Method 3: Create Calendar In Excel Using VBA Code

In this method, you will get know-how using the Visual Basic for Applications(VBA) macro code you can create calendar in Excel.

  1. Open your Excel workbook.
  2. For excel 2003 users: Go to the Tools menu, and then hit the Macro tab. After that choose the Visual Basic Editor.

For Excel 2007 or later users: go to the Developer tab from the Excel ribbon and choose Visual Basic.

  1. From the Insert menu, choose the Module option.
  2. Now paste the VBA code which is given below into the opened sheet of the module.
  3. Go to the File menu and choose the Close and Return to Microsoft Excel.
  4. Now make a selection of the Sheet1
  5. From the Tools menu, go to the Macro tab. After that choose the Macros icon.
  6. Now you have to choose the CalendarMaker Now press the Run button to create Excel calendar.

Visual Basic Procedure To Create a Calendar In Excel:

You have to paste this code in the module sheet.

Sub CalendarMaker()

‘ Unprotect sheet if had previous calendar to prevent error.
ActiveSheet.Protect DrawingObjects:=False, Contents:=False, _
Scenarios:=False
‘ Prevent screen flashing while drawing calendar.
Application.ScreenUpdating = False
‘ Set up error trapping.
On Error GoTo MyErrorTrap
‘ Clear area a1:g14 including any previous calendar.
Range(“a1:g14”).Clear
‘ Use InputBox to get desired month and year and set variable
‘ MyInput.
MyInput = InputBox(“Type in Month and year for Calendar “)
‘ Allow user to end macro with Cancel in InputBox.
If MyInput = “” Then Exit Sub
‘ Get the date value of the beginning of inputted month.
StartDay = DateValue(MyInput)
‘ Check if valid date but not the first of the month
‘ — if so, reset StartDay to first day of month.
If Day(StartDay) <> 1 Then
StartDay = DateValue(Month(StartDay) & “/1/” & _
Year(StartDay))
End If
‘ Prepare cell for Month and Year as fully spelled out.
Range(“a1”).NumberFormat = “mmmm yyyy”
‘ Center the Month and Year label across a1:g1 with appropriate
‘ size, height and bolding.
With Range(“a1:g1”)
.HorizontalAlignment = xlCenterAcrossSelection
.VerticalAlignment = xlCenter
.Font.Size = 18
.Font.Bold = True
.RowHeight = 35
End With
‘ Prepare a2:g2 for day of week labels with centering, size,
‘ height and bolding.
With Range(“a2:g2”)
.ColumnWidth = 11
.VerticalAlignment = xlCenter
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
.Orientation = xlHorizontal
.Font.Size = 12
.Font.Bold = True
.RowHeight = 20
End With
‘ Put days of week in a2:g2.
Range(“a2”) = “Sunday”
Range(“b2”) = “Monday”
Range(“c2”) = “Tuesday”
Range(“d2”) = “Wednesday”
Range(“e2”) = “Thursday”
Range(“f2”) = “Friday”
Range(“g2”) = “Saturday”
‘ Prepare a3:g7 for dates with left/top alignment, size, height
‘ and bolding.
With Range(“a3:g8”)
.HorizontalAlignment = xlRight
.VerticalAlignment = xlTop
.Font.Size = 18
.Font.Bold = True
.RowHeight = 21
End With
‘ Put inputted month and year fully spelling out into “a1”.
Range(“a1”).Value = Application.Text(MyInput, “mmmm yyyy”)
‘ Set variable and get which day of the week the month starts.
DayofWeek = WeekDay(StartDay)
‘ Set variables to identify the year and month as separate
‘ variables.
CurYear = Year(StartDay)
CurMonth = Month(StartDay)
‘ Set variable and calculate the first day of the next month.
FinalDay = DateSerial(CurYear, CurMonth + 1, 1)
‘ Place a “1” in cell position of the first day of the chosen
‘ month based on DayofWeek.
Select Case DayofWeek
Case 1
Range(“a3”).Value = 1
Case 2
Range(“b3”).Value = 1
Case 3
Range(“c3”).Value = 1
Case 4
Range(“d3”).Value = 1
Case 5
Range(“e3”).Value = 1
Case 6
Range(“f3”).Value = 1
Case 7
Range(“g3”).Value = 1
End Select
‘ Loop through range a3:g8 incrementing each cell after the “1”
‘ cell.
For Each cell In Range(“a3:g8”)
RowCell = cell.Row
ColCell = cell.Column
‘ Do if “1” is in first column.
If cell.Column = 1 And cell.Row = 3 Then
‘ Do if current cell is not in 1st column.
ElseIf cell.Column <> 1 Then
If cell.Offset(0, -1).Value >= 1 Then
cell.Value = cell.Offset(0, -1).Value + 1
‘ Stop when the last day of the month has been
‘ entered.
If cell.Value > (FinalDay – StartDay) Then
cell.Value = “”
‘ Exit loop when calendar has correct number of
‘ days shown.
Exit For
End If
End If
‘ Do only if current cell is not in Row 3 and is in Column 1.
ElseIf cell.Row > 3 And cell.Column = 1 Then
cell.Value = cell.Offset(-1, 6).Value + 1
‘ Stop when the last day of the month has been entered.
If cell.Value > (FinalDay – StartDay) Then
cell.Value = “”
‘ Exit loop when calendar has correct number of days
‘ shown.
Exit For
End If
End If
Next

‘ Create Entry cells, format them centered, wrap text, and border
‘ around days.
For x = 0 To 5
Range(“A4”).Offset(x * 2, 0).EntireRow.Insert
With Range(“A4:G4”).Offset(x * 2, 0)
.RowHeight = 65
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlTop
.WrapText = True
.Font.Size = 10
.Font.Bold = False
‘ Unlock these cells to be able to enter text later after
‘ sheet is protected.
.Locked = False
End With
‘ Put border around the block of dates.
With Range(“A3”).Offset(x * 2, 0).Resize(2, _
7).Borders(xlLeft)
.Weight = xlThick
.ColorIndex = xlAutomatic
End With

With Range(“A3”).Offset(x * 2, 0).Resize(2, _
7).Borders(xlRight)
.Weight = xlThick
.ColorIndex = xlAutomatic
End With
Range(“A3”).Offset(x * 2, 0).Resize(2, 7).BorderAround _
Weight:=xlThick, ColorIndex:=xlAutomatic
Next
If Range(“A13”).Value = “” Then Range(“A13”).Offset(0, 0) _
.Resize(2, 8).EntireRow.Delete
‘ Turn off gridlines.
ActiveWindow.DisplayGridlines = False
‘ Protect sheet to prevent overwriting the dates.
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, _
Scenarios:=True

‘ Resize window to show all of calendar (may have to be adjusted
‘ for video configuration).
ActiveWindow.WindowState = xlMaximized
ActiveWindow.ScrollRow = 1

‘ Allow screen to redraw with calendar showing.
Application.ScreenUpdating = True
‘ Prevent going to error trap unless error found by exiting Sub
‘ here.
Exit Sub
‘ Error causes msgbox to indicate the problem, provides new input box,
‘ and resumes at the line that caused the error.
MyErrorTrap:
MsgBox “You may not have entered your Month and Year correctly.” _
& Chr(13) & “Spell the Month correctly” _
& ” (or use 3 letter abbreviation)” _
& Chr(13) & “and 4 digits for the Year”
MyInput = InputBox(“Type in Month and year for Calendar”)
If MyInput = “” Then Exit Sub
Resume
End Sub

Note: You can customize the above code as per your requirement.

How Do I Make Excel Calendar Update Automatically?

Automatization is the chief strength of Microsoft Excel. However, if you need to create your calendar update automatically then use the formula mentioned below:

“= EOMONTH (TODAY() , – 1) +1”.

Well, the above formula employs “TODAY” feature to locate the present date & calculates the 1st day of the month with the “EOMONTH” feature.

Related FAQs:

Does Excel Have a Calendar Template?

Yes, of course, Microsoft Excel have a wide variety of calendar templates that can be used easily.

What Is the Formula to Create a Calendar in Excel?

=DATE(A2,A1,1) is the formula that can be used to create a calendar in MS Excel. All you need to do is to select the blank cell for showing the starting month’s date, then simply enter =DATE(A2,A1,1) in a formula bar >> press Enter key.

Can You Insert a Calendar into An Excel Cell?

YES, you can insert a calendar into an Excel cell. For this, you have to go to File menu >> select Close & Return to MS Excel. After this, select a tab ‘Sheet1’. On Tools menu, simply point to the Macro, & select Macros. choose CalendarMaker >> select the Run to create a calendar.

Also Read: How To Create Backup Of Active Workbooks In Excel?

Wrap Up:

MS Excel offers its user a broad range of tools which will increase their productivity by using the projects, dates, and tracking events. In order to view the data of your Excel worksheet in calendar format, Microsoft will change your data and then import it into the Outlook. This will automatically change it into a calendar format.

Hopefully, you must have found an ample amount of information in this post. Thanks for reading this post….!

Priyanka is an entrepreneur & content marketing expert. She writes tech blogs and has expertise in MS Office, Excel, and other tech subjects. Her distinctive art of presenting tech information in the easy-to-understand language is very impressive. When not writing, she loves unplanned travels.

Понравилась статья? Поделить с друзьями:
  • Calculations in excel with time
  • Calculations in excel tables
  • Calculation with vba in excel
  • Calculation using if function excel
  • Calculation table in excel