Skip to main content

Conas féilire a chruthú in Excel?

Cuidíonn féilire Excel leat súil a choinneáil ar imeachtaí tábhachtacha, mar nuair a thosaíonn duine post nua nó nuair is gá rud éigin a sheachadadh. Déanann sé na dátaí seo a fheiceáil éasca agus soiléir. Sa treoir seo, taispeánfaidh mé duit conas féilirí míosúla agus bliantúla a dhéanamh in Excel. Breathnóimid ar theimpléid a úsáid le haghaidh socrú tapa agus freisin conas ceann a dhéanamh ón tús dóibh siúd ar mian leo níos mó smachta. Ar an mbealach seo, is féidir leat fanacht eagraithe, cibé an bhfuil sé le haghaidh oibre nó pleananna pearsanta.

Cruthaigh féilire bliantúil trí úsáid a bhaint as Teimpléid Féilire Excel

Cruthaigh féilire míosúil nó bliantúil go tapa le Kutools for Excel

Cruthaigh féilire míosúil le cód VBA


Cruthaigh féilire bliantúil trí úsáid a bhaint as Teimpléid Féilire Excel

Leis an modh seo, ní mór duit a chinntiú go nascann do ríomhaire leis an líonra, ionas gur féidir leat an Teimpléid Féilire.

1. Téigh Comhad tab, cliceáil Nua cnaipe ar an phána chlé, agus cliceáil Féilirí ó Cuardach molta. Féach an pictiúr:

2. Roghnaigh ceann amháin de na teimpléid féilire a thaitníonn leat, cliceáil faoi dhó air chun an féilire bliantúil a chruthú.

Toradh


Cruthaigh féilire míosúil nó bliantúil go tapa le Kutools for Excel

Féilire Síor uirlis de kutools le haghaidh Excel in ann féilire míosa saincheaptha nó féilire bliana a chruthú go tapa i leabhar oibre nua, agus beidh féilire nua i ngach bileog oibre.

Nóta: Chun é seo a chur i bhfeidhm Féilire Síor gné, ar dtús, ba chóir duit a íoslódáil agus a shuiteáil Kutools le haghaidh Excel.

Tar éis Kutools a shuiteáil le haghaidh Excel, cliceáil le do thoil Kutools Plus > Bileog Oibre > Féilire Síor. Sa popping-up Féilire Síor bosca dialóige, déan mar a leanas le do thoil:

  • Chun féilire míosúil a chruthú, sonraigh na míonna ar mhaith leat an féilire a chruthú tríd an ó agusChun liosta anuas, agus cliceáil Cruthaigh.
  • Chun féilire bliantúil a chruthú, sonraigh an bhliain ar mhaith leat an féilire a chruthú tríd an ó agus Chun liosta anuas, agus cliceáil Cruthaigh.
Toradh
  • Féilire míosúil:
  • Féilire bliantúil:
Leid: Chun an ghné seo a úsáid, ba chóir duit a shuiteáil Kutools le haghaidh Excel ar dtús, le do thoil cliceáil chun é a íoslódáil agus triail saor in aisce 30-lá a bheith agat anois.

Cruthaigh féilire míosúil le cód VBA

Leis an gcód VBA seo a leanas, is féidir leat féilire míosúil a chruthú go tapa. Déan mar a leanas le do thoil:

1. Brúigh Eile + F11 eochracha chun an fhuinneog Microsoft Visual Basic for Applications a oscailt.

2. Beidh fuinneog nua ar taispeáint. Cliceáil Ionsáigh > Modúil, ansin na cóid seo a leanas a ionchur sa mhodúl:

 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. Ansin cliceáil Rith cnaipe nó brúigh F5 eochair chun feidhmchlár a rith. Anois beidh bosca pras pop amach, is féidir leat an mhí agus an bhliain a ionchur sa bhosca bán.

Toradh

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