Vai al contenuto principale

Come creare un calendario in Excel?

Un calendario Excel ti aiuta a tenere traccia degli eventi importanti, ad esempio quando qualcuno inizia un nuovo lavoro o quando è necessario consegnare qualcosa. Rende la visualizzazione di queste date facile e chiara. In questa guida ti mostrerò come creare calendari mensili e annuali in Excel. Vedremo come utilizzare i modelli per una configurazione rapida e anche come crearne uno da zero per coloro che desiderano un maggiore controllo. In questo modo puoi rimanere organizzato, sia che si tratti di lavoro o di piani personali.

Crea un calendario annuale utilizzando i modelli di calendario Excel

Crea rapidamente un calendario mensile o annuale con Kutools per Excel

Crea un calendario mensile con codice VBA


Crea un calendario annuale utilizzando i modelli di calendario Excel

Con questo metodo, devi assicurarti che il tuo computer si colleghi alla rete, in modo da poter scaricare il file Modelli di calendario.

1. Vai a Compila il scheda, fare clic New pulsante nel riquadro sinistro, quindi fare clic Calendari da soli Ricerche suggerite. Vedi screenshot:

2. seleziona uno dei modelli di calendario che ti piacciono, fai doppio clic su di esso per creare il calendario annuale.

Risultato


Crea rapidamente un calendario mensile o annuale con Kutools per Excel

Calendario Perpetuo strumento di kutools per Excel può creare rapidamente un calendario mensile o annuale personalizzato in una nuova cartella di lavoro e ogni calendario mensile sarà contenuto in un nuovo foglio di lavoro.

Nota: Per applicare questo Calendario Perpetuo caratteristica, in primo luogo, è necessario scaricare e installare Kutools for Excel.

Dopo aver installato Kutools per Excel, fare clic su Kutools Plus > Foglio di lavoro > Calendario Perpetuo. Nel pop-up Calendario Perpetuo finestra di dialogo, eseguire le seguenti operazioni:

  • Per creare un calendario mensile, specifica i mesi in cui desideri creare il calendario tramite Da edA elenco a discesa e fare clic su Creare.
  • Per creare un calendario annuale, specifica l'anno in cui desideri creare il calendario tramite Da ed A elenco a discesa e fare clic su Creare.
Risultato
  • Un calendario mensile:
  • Un calendario annuale:
Consiglio: per utilizzare questa funzione è necessario installare Kutools for Excel prima, per favore fare clic per scaricare e avere una prova gratuita di 30 giorni ora.

Crea un calendario mensile con codice VBA

Con il seguente codice VBA, puoi creare rapidamente un calendario mensile. Si prega di fare quanto segue:

1. stampa altro + F11 tasti per aprire la finestra di Microsoft Visual Basic, Applications Edition.

2. Verrà visualizzata una nuova finestra. Clic inserire > Moduli, quindi inserisci i seguenti codici nel modulo:

 Sub CalendarMaker()
ActiveSheet.Protect DrawingObjects:=False, Contents:=False, _
Scenarios:=False
Application.ScreenUpdating = False
On Error GoTo MyErrorTrap
Range("a1:g14").Clear
MyInput = InputBox("Type in Month and year for Calendar ")
If MyInput = "" Then Exit Sub
StartDay = DateValue(MyInput)
If Day(StartDay) <> 1 Then
StartDay = DateValue(Month(StartDay) & "/1/" & _
Year(StartDay))
End If
Range("a1").NumberFormat = "mmmm yyyy"
With Range("a1:g1")
.HorizontalAlignment = xlCenterAcrossSelection
.VerticalAlignment = xlCenter
.Font.Size = 18
.Font.Bold = True
.RowHeight = 35
End With
With Range("a2:g2")
.ColumnWidth = 11
.VerticalAlignment = xlCenter
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
.Orientation = xlHorizontal
.Font.Size = 12
.Font.Bold = True
.RowHeight = 20
End With
Range("a2") = "Sunday"
Range("b2") = "Monday"
Range("c2") = "Tuesday"
Range("d2") = "Wednesday"
Range("e2") = "Thursday"
Range("f2") = "Friday"
Range("g2") = "Saturday"
With Range("a3:g8")
.HorizontalAlignment = xlRight
.VerticalAlignment = xlTop
.Font.Size = 18
.Font.Bold = True
.RowHeight = 21
End With
Range("a1").Value = Application.Text(MyInput, "mmmm yyyy")
DayofWeek = Weekday(StartDay)
CurYear = Year(StartDay)
CurMonth = Month(StartDay)
FinalDay = DateSerial(CurYear, CurMonth + 1, 1)
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
For Each cell In Range("a3:g8")
RowCell = cell.Row
ColCell = cell.Column
If cell.Column = 1 And cell.Row = 3 Then
ElseIf cell.Column <> 1 Then
If cell.Offset(0, -1).Value >= 1 Then
cell.Value = cell.Offset(0, -1).Value + 1
If cell.Value > (FinalDay - StartDay) Then
cell.Value = ""
Exit For
End If
End If
ElseIf cell.Row > 3 And cell.Column = 1 Then
cell.Value = cell.Offset(-1, 6).Value + 1
If cell.Value > (FinalDay - StartDay) Then
cell.Value = ""
Exit For
End If
End If
Next
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
.Locked = False
End With
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
ActiveWindow.DisplayGridlines = False
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, _
Scenarios:=True
ActiveWindow.WindowState = xlMaximized
ActiveWindow.ScrollRow = 1
Application.ScreenUpdating = True
Exit Sub
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 

3. Quindi fare clic Correre pulsante o premere F5 chiave per eseguire l'applicazione. Ora verrà visualizzata una finestra di messaggio, puoi inserire il mese e l'anno nella casella vuota.

Risultato

Comments (3)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Thanks guys for helping. Would like to be able to have a yearly Calendar in which I can enter items. If you can help that would be great.
This comment was minimized by the moderator on the site
Hi, How can I make it start on Monday instead? Thanks in advance
This comment was minimized by the moderator on the site
Excellent job. Billions thanks for your great design of the Excel calendar template. :lol:
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations