在本指南中,我将讨论在 Microsoft Excel 中创建日历的(create a calendar in Microsoft Excel)方法。在Excel(Excel)中创建自定义日历有多种不同的方法。您可以从头开始创建自己的日历模板,也可以使用预先设计的日历模板来制作。此外,您还可以借助Visual Basic代码创建自动日历。让我们来看看这些在Excel中制作日历的方法。
如何在 Excel 中创建日历
以下是在Microsoft Excel中制作日历的方法:
- 在Excel中使用预先设计的日历模板(Calendar Template)
- (Create)使用Visual Basic代码创建自动日历(Calendar)
- 从头开始(Scratch)在Excel中手动创建日历(Calendar)
1]在Excel中(Excel)使用(Use)预先设计的日历模板(Calendar Template)
要在Excel(Excel)中创建日历,您可以使用Microsoft预先设计的模板。它提供了多种日历模板,您可以浏览、导入和自定义。这种方法简单快捷。只需(Just)确保您已连接到有效的 Internet 连接即可从在线获取模板。
您可以转到“File > New选项,然后在搜索框中键入“日历”。(Calendar)
Excel将显示其在线库中的许多令人惊叹的日历模板供您选择,例如季节性照片日历、学术日历、月相日历、生日日历、夏季活动日历、社交媒体内容日历(Seasonal Photo Calendar, Academic Calendar, Phases of the moon Calendar, Birthday Calendar, Summer Activity Calendar, Social Media Content Calendar,)等等。
选择一个适合您的要求,然后单击“创建(Create)”按钮将其导入您的Excel工作簿。
您可以稍后根据需要自定义日历模板。例如,您可以将事件添加到日历、计划特定日期的活动、突出显示重要日期、格式化文本、将图像添加到日历等。完成后,您可以将日历导出为Excel或任何其他电子表格或PDF格式。
2]使用Visual Basic代码创建(Create)一个自动日历(Automatic Calendar)
您还可以使用Microsoft提供的(Microsoft)Visual Basic代码创建自动日历。以下是执行此操作的步骤:
打开 Excel 并转到开发人员(Developers)选项卡。如果您在Excel中看不到(Excel)Developers选项卡,请转到File > Options并从Customize Ribbon部分,启用Developers选项卡。
转到开发人员(Developers)选项卡,然后单击Visual Basic选项。您将看到Microsoft Visual Basic for Applications窗口。在此窗口中,单击“ Insert > Module”选项。然后,输入创建日历的代码。
您可以从microsoft.com(microsoft.com)复制代码,然后粘贴到Visual Basic窗口中。
之后,单击“文件”菜单中的“关闭并返回 Microsoft Excel( Close and Return to Microsoft Excel) ”选项。
在 Excel 中,选择Developers > Macros选项,然后选择CalendarMaker模块并单击Run按钮。
它会要求您输入月份和年份以创建日历。相应地输入(Enter)并单击“确定”按钮。它将添加输入的月历。您可以在不同的工作表中多次执行此操作以输入一年中的所有月份。
阅读(Read):如何使用 Publisher 创建日历(How to create Calendars with Publisher)。
3 ]从头开始(Scratch)在Excel中(Excel)手动(] Manually)创建日历(Calendar)
您还可以在Microsoft Excel(Microsoft Excel)中从头开始创建日历。只需(Just)按照以下步骤即可:
- 准备日历的基本结构。
- 格式化单元格对齐。
- 输入一个月的日期。
- (Create)为所有月份创建多张工作表。
- 打印日历。
让我们详细讨论这些步骤!
启动Excel并创建一个空白工作簿。现在,在第一行添加月份名称,然后在电子表格的下一行输入所有日期。一年的第一个月有 31 天,有 7 个月有 31 天。因此,通常,我们必须创建一个 7 列 x 5 行的网格。
现在,选择所有天的列并将第一列的大小调整为日历中列的首选大小。这将同时自动调整所有列的宽度。以同样的方式,调整周行的高度。
接下来,要将天数与每个单元格的右上角对齐,请选择网格中的所有单元格并右键单击一个单元格。从上下文菜单中,单击“设置单元格格式( Format Cells)”选项。在新的对话框窗口中,转到Alignment选项卡并选择Horizontal field to Right和Vertical to Top。
之后,我们必须将月份的日期输入日历。为此,您必须知道该月的第一天,因此请在线查看。例如,2021 年 1 月(January 2021),第一天从星期五(Friday)开始。因此,从Friday开始,依次输入日期,直到 31。
将 Sheet1 重命名(Rename Sheet1)为January并右键单击它。选择Move or Copy > Create a Copy选项。这样,再添加 11 个工作表并将它们重命名为每个月的名称。
现在,您将不得不调整每个月的日期。根据一月(January)的最后一天,您可以开始二月(February)的第一天。对年度日历中的所有月份重复此操作,您的日历将准备就绪。您现在可以使用格式选项自定义日历、将事件添加到日历等。
如果要打印日历,只需转到File > Print选项,然后设置方向(选择横向)、缩放、启用网格线和其他页面选项。
就是这样!
希望这可以帮助您使用首选方法在Excel中创建日历。
阅读下一篇(Read next):如何将 Calendar Insights 工作簿与 Excel 中的数据一起保存。
How to create a Calendar in Excel
In this gυide, I will be discussing methods to create a calendar in Microsoft Excel. There are multiple different ways to create a customized calendar in Excel. You can create your own calendar template from scratch or use a predesigned calendar template to make one. Additionally, you can also create an automatic calendar with the help of Visual Basic code. Let us check out these methods to make a calendar in Excel in detail.
How to create a Calendar in Excel
Here are the methods to make a calendar in Microsoft Excel:
- Use a Pre-designed Calendar Template in Excel
- Create an automatic Calendar using Visual Basic code
- Manually create a Calendar in Excel from Scratch
1] Use a Pre-designed Calendar Template in Excel
To create a calendar in Excel, you can use a pre-designed template from Microsoft. It provides a variety of calendar templates that you can browse, import, and customize. This method is easy and quick. Just make sure you are connected to an active internet connection to get templates from online.
You can go to the File > New option and then type Calendar in the search box.
Excel will display a lot of stunning calendar templates from its online library to choose from, like Seasonal Photo Calendar, Academic Calendar, Phases of the moon Calendar, Birthday Calendar, Summer Activity Calendar, Social Media Content Calendar, and many more.
Select the one that suits your requirement and then click on the Create button to import it to your Excel workbook.
You can later customize the calendar template as per your need. For example, you can add events to your calendar, plan activities for particular dates, highlight important dates, format text, add images to your calendar, etc. When done, you can export the calendar in Excel or any other spreadsheet or PDF format.
2] Create an Automatic Calendar using Visual Basic code
You can also create an automatic calendar using Visual Basic code provided by Microsoft. Here are the steps for that:
Open Excel and go to the Developers tab. In case you don’t see a Developers tab in Excel, go to File > Options and from the Customize Ribbon section, enable the Developers tab.
Go to the Developers tab and click on the Visual Basic option. You will see a Microsoft Visual Basic for Applications window. In this window, click on the Insert > Module option. And then, enter the code for creating a calendar.
You can copy the code from microsoft.com and then paste in the Visual Basic window.
After that, click on the Close and Return to Microsoft Excel option from the File menu.
In Excel, select the Developers > Macros option and then select the CalendarMaker module and click on the Run button.
It will ask you to enter the month and year to create a calendar. Enter accordingly and click on the OK button. It will add the entered monthly calendar. You can do that multiple times in different sheets to enter all months of a year.
Read: How to create Calendars with Publisher.
3] Manually create a Calendar in Excel from Scratch
You can also create a calendar from scratch in Microsoft Excel. Just follow the below steps to do that:
- Prepare the basic structure of the calendar.
- Format cell alignment.
- Enter Dates of a month.
- Create multiple sheets for all months.
- Print the calendar.
Let us discuss these steps in detail!
Launch Excel and create a blank workbook. Now, add the month name in the top row and then enter all the days in the next row of the spreadsheet. The first month of a year contains 31 days and there are 7 months that contain 31 days. So, typically, we will have to create a 7 columns x 5 rows grid.
Now, select all the days’ columns and adjust the size of the first column to your preferred size of a column in a calendar. This will auto-adjust the width of all columns simultaneously. In the same manner, adjust the height of week rows.
Next, to align days number to upper-right in each cell, select all the cells in the grid and right-click on a cell. From the context menu, click on the Format Cells option. In the new dialog window, go to the Alignment tab and select Horizontal field to Right and Vertical to Top.
After that, we will have to enter the dates of the month into a calendar. For that, you must know the first day of the month, so do check online. For example, in January 2021, the first day started on Friday. So, starting from Friday, enter dates in sequence until 31.
Rename Sheet1 as January and right-click on it. Select the Move or Copy > Create a Copy option. In this way, add 11 more sheets and rename them as per month name.
Now, you will have to adjust the dates for each month. As per the last date of January month, you can start the first day of February month. Repeat this for all the months in a yearly calendar and your calendar will be ready. You can now customize the calendar using formatting options, adding events to the calendar, etc.
If you want to print your calendar, you can simply go to the File > Print option and then set up orientation (choose landscape), scaling, enable gridline, and other page options.
That’s it!
Hope this helps you create a calendar in Excel using your preferred method.
Read next: How to save Calendar Insights workbook with your data in Excel.