Auto-Create a monthly Sign in sheet for preschool students

jonwondon

New Member
Joined
Oct 20, 2020
Messages
39
Office Version
  1. 2019
Platform
  1. Windows
The image below is what each page looks like. Above is space for the "Child Name" "Month" "Class"

School days are obviously Monday-Friday but they start on different days depending on what month it is. For example: Next month, November 2020's first school day will be Monday the 2nd (11/2/20). I'm trying to avoid going into the table and manually editing all the dates and days to correspond with the coming month. This task takes a good hour or two when running the front desk. Is there a way to auto generate this?

Right now the table is in word, but I feel like an excel spreadsheet would be best. Thanks in advance for your help.
Monthly.PNG
 
Are you now trying to do this with a formula?
You never answered back as if my most recent posting worked.
Allowing you to enter month and year.
 
Upvote 0

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
Are you now trying to do this with a formula?
You never answered back as if my most recent posting worked.
Allowing you to enter month and year.

It works perfect. But I wanted to ask, is there a way I can have it be entered into the current selected Cell? Also, can the data just be added without creating a blank sheet?

Like if I make a template table to print these dates into. I want to select the top cell within my table and have the data run into the rest of the selected column.
 
Upvote 0
Create new EXCEL File ready for use

VBA Code:
Public Sub atoCreate()

Dim WB As Workbook: Set WB = Workbooks.Add
Dim WS As Worksheet: Set WS = WB.Worksheets(1)
Dim YY As Long, MM As Long, B As Long
Dim DefltPath As String
DefltPath = Environ("USERPROFILE") & "\Desktop\"
YY = 2020
MM = 9
Dim Rng As Range
    With WS
        .Name = "Monthly Sign Sheet"
        .Activate
        ActiveWindow.DisplayGridlines = False
        With .Cells(1, 1)
        .Value = YY
        .HorizontalAlignment = xlCenter
        .VerticalAlignment = xlCenter
        .RowHeight = 25
        End With
       
        With .Cells(1, 2)
        .Value = MM
        .HorizontalAlignment = xlCenter
        .VerticalAlignment = xlCenter
        End With
       
        With .Cells(3, 1).Resize(1, 5)
            .Value = Array("Day/Date", "Time In", "Parent Signture", "Time Out", "Parent Signture")
       
            With .Interior
                .Pattern = xlSolid
                .Color = RGB(47, 117, 181)
            End With ' .Interior
            With .Font
                .Color = RGB(255, 255, 255)
            End With ' .Font
            .ColumnWidth = VBA.Array(15, 20, 25, 20, 25)
            .RowHeight = 30
            .HorizontalAlignment = xlCenter
            .VerticalAlignment = xlCenter
            .WrapText = False
        End With ' .Cells(3, 1).Resize(1, 5)
       
        With .Cells(4, 1).Resize(25, 1)
        .FormulaArray = "=TEXT(DATE($A$1,$B$1,(ROW()-ROW($A$4)+1))+(((CEILING((ROW()-ROW($A$4)+1)+IF(WEEKDAY(DATE($A$1,$B$1,1))=1,WEEKDAY(DATE($A$1,$B$1,1))+1-2,WEEKDAY(DATE($A$1,$B$1,1))-2),5)/5)-1)*2)+IF(WEEKDAY(DATE($A$1,$B$1,1))=1,1,0),""dddd"" & CHAR(10) & "" mm/dd/yyyy"")"
        .WrapText = True
        .RowHeight = 35
        .VerticalAlignment = xlCenter
        End With ' .Cells(4, 1).Resize(30, 1)
       
        With .Cells(3, 1).Resize(26, 5)
            For B = 7 To 12
                With .Borders(B)
                    .LineStyle = xlContinuous
                    .Color = RGB(0, 0, 0)
                    .Weight = xlThin
                End With
            Next
        End With ' .Cells(3, 1).Resize(31, 1)
   
   
             With Range("A27:E27")
             .FormatConditions.Add Type:=xlExpression, Formula1:= _
                 "=MONTH(TRIM(MID($A$27,FIND(CHAR(10),$A$27,1)+2,10)))<>$B$1"
             .FormatConditions(.FormatConditions.Count).SetFirstPriority
             With .FormatConditions(1).Font
                 .ThemeColor = xlThemeColorDark1
                 .TintAndShade = 0
             End With
             .FormatConditions(1).Borders(xlLeft).LineStyle = xlNone
             .FormatConditions(1).Borders(xlRight).LineStyle = xlNone
             .FormatConditions(1).Borders(xlBottom).LineStyle = xlNone
             .FormatConditions(1).StopIfTrue = False
            End With
           
             With Range("A28:E28")
             .FormatConditions.Add Type:=xlExpression, Formula1:= _
                 "=MONTH(TRIM(MID($A$28,FIND(CHAR(10),$A$28,1)+2,10)))<>$B$1"
             .FormatConditions(.FormatConditions.Count).SetFirstPriority
             With .FormatConditions(1).Font
                 .ThemeColor = xlThemeColorDark1
                 .TintAndShade = 0
             End With
             .FormatConditions(1).Borders(xlLeft).LineStyle = xlNone
             .FormatConditions(1).Borders(xlRight).LineStyle = xlNone
             .FormatConditions(1).Borders(xlBottom).LineStyle = xlNone
             .FormatConditions(1).StopIfTrue = False
            End With
            With .Spinners.Add(.Cells(1, 1).Left, .Cells(1, 1).Top, 18, .Cells(1, 1).Height)
                .Value = 2020
                .Min = 2015
                .Max = 2040
                .SmallChange = 1
                .LinkedCell = "$A$1"
                .Display3DShading = False
            End With
            With .Spinners.Add(.Cells(1, 2).Left, .Cells(1, 1).Top, 18, .Cells(1, 1).Height)
                .Value = 11
                .Min = 1
                .Max = 12
                .SmallChange = 1
                .LinkedCell = "$B$1"
                .Display3DShading = False
            End With
           
            On Error Resume Next
                Kill DefltPath & "Monthly Sign in Sheet.xlsm"
                .Parent.SaveAs Filename:=DefltPath & "Monthly Sign in Sheet.xlsm", FileFormat:=xlOpenXMLWorkbookMacroEnabled, CreateBackup:=False
            On Error GoTo 0
       
    End With ' WS

End Sub
 

Attachments

  • ffff.gif
    ffff.gif
    236.7 KB · Views: 6
Upvote 0
T202010b.xlsm
ABCDE
1202011
2
3Day/DateTime InParent SignatureTime InParent Signature
4Monday
5Tue 03-Nov
6Wed 04-Nov
4aa
Cell Formulas
RangeFormula
A4A4=WORKDAY.INTL(DATE(A1,B1,0),1,1,HolidayList)
A5:A6A5=WORKDAY.INTL(A4,1,1,HolidayList)
Named Ranges
NameRefers ToCells
HolidayList='4aa'!$L$2:$L$3A4:A6


- includes Holiday List
- could edit for 1,2, 3, 4, or 5 day weeks
- could modify for alternating schedules
- customize the dates to your preference
 
Upvote 0
T202010b.xlsm
ABCDE
1Day/DateTime InParent SignatureTime InParent Signature
2Start YearStart Month
3202011
431-10-20
5Monday
6Tue 03-Nov
7Wed 04-Nov
8Thu 05-Nov
9Fri 06-Nov
10Mon 09-Nov
4aa (2)
Cell Formulas
RangeFormula
A4A4=DATE(A3,B3,0)
A5:A10A5=WORKDAY.INTL(A4,1,1,HolidayList)
Named Ranges
NameRefers ToCells
'4aa (2)'!HolidayList='4aa (2)'!$L$5:$L$6A5:A10


You could hide row 4

Save as a template
 
Upvote 0
Create new EXCEL File ready for use

VBA Code:
Public Sub atoCreate()

Dim WB As Workbook: Set WB = Workbooks.Add
Dim WS As Worksheet: Set WS = WB.Worksheets(1)
Dim YY As Long, MM As Long, B As Long
Dim DefltPath As String
DefltPath = Environ("USERPROFILE") & "\Desktop\"
YY = 2020
MM = 9
Dim Rng As Range
    With WS
        .Name = "Monthly Sign Sheet"
        .Activate
        ActiveWindow.DisplayGridlines = False
        With .Cells(1, 1)
        .Value = YY
        .HorizontalAlignment = xlCenter
        .VerticalAlignment = xlCenter
        .RowHeight = 25
        End With
      
        With .Cells(1, 2)
        .Value = MM
        .HorizontalAlignment = xlCenter
        .VerticalAlignment = xlCenter
        End With
      
        With .Cells(3, 1).Resize(1, 5)
            .Value = Array("Day/Date", "Time In", "Parent Signture", "Time Out", "Parent Signture")
      
            With .Interior
                .Pattern = xlSolid
                .Color = RGB(47, 117, 181)
            End With ' .Interior
            With .Font
                .Color = RGB(255, 255, 255)
            End With ' .Font
            .ColumnWidth = VBA.Array(15, 20, 25, 20, 25)
            .RowHeight = 30
            .HorizontalAlignment = xlCenter
            .VerticalAlignment = xlCenter
            .WrapText = False
        End With ' .Cells(3, 1).Resize(1, 5)
      
        With .Cells(4, 1).Resize(25, 1)
        .FormulaArray = "=TEXT(DATE($A$1,$B$1,(ROW()-ROW($A$4)+1))+(((CEILING((ROW()-ROW($A$4)+1)+IF(WEEKDAY(DATE($A$1,$B$1,1))=1,WEEKDAY(DATE($A$1,$B$1,1))+1-2,WEEKDAY(DATE($A$1,$B$1,1))-2),5)/5)-1)*2)+IF(WEEKDAY(DATE($A$1,$B$1,1))=1,1,0),""dddd"" & CHAR(10) & "" mm/dd/yyyy"")"
        .WrapText = True
        .RowHeight = 35
        .VerticalAlignment = xlCenter
        End With ' .Cells(4, 1).Resize(30, 1)
      
        With .Cells(3, 1).Resize(26, 5)
            For B = 7 To 12
                With .Borders(B)
                    .LineStyle = xlContinuous
                    .Color = RGB(0, 0, 0)
                    .Weight = xlThin
                End With
            Next
        End With ' .Cells(3, 1).Resize(31, 1)
  
  
             With Range("A27:E27")
             .FormatConditions.Add Type:=xlExpression, Formula1:= _
                 "=MONTH(TRIM(MID($A$27,FIND(CHAR(10),$A$27,1)+2,10)))<>$B$1"
             .FormatConditions(.FormatConditions.Count).SetFirstPriority
             With .FormatConditions(1).Font
                 .ThemeColor = xlThemeColorDark1
                 .TintAndShade = 0
             End With
             .FormatConditions(1).Borders(xlLeft).LineStyle = xlNone
             .FormatConditions(1).Borders(xlRight).LineStyle = xlNone
             .FormatConditions(1).Borders(xlBottom).LineStyle = xlNone
             .FormatConditions(1).StopIfTrue = False
            End With
          
             With Range("A28:E28")
             .FormatConditions.Add Type:=xlExpression, Formula1:= _
                 "=MONTH(TRIM(MID($A$28,FIND(CHAR(10),$A$28,1)+2,10)))<>$B$1"
             .FormatConditions(.FormatConditions.Count).SetFirstPriority
             With .FormatConditions(1).Font
                 .ThemeColor = xlThemeColorDark1
                 .TintAndShade = 0
             End With
             .FormatConditions(1).Borders(xlLeft).LineStyle = xlNone
             .FormatConditions(1).Borders(xlRight).LineStyle = xlNone
             .FormatConditions(1).Borders(xlBottom).LineStyle = xlNone
             .FormatConditions(1).StopIfTrue = False
            End With
            With .Spinners.Add(.Cells(1, 1).Left, .Cells(1, 1).Top, 18, .Cells(1, 1).Height)
                .Value = 2020
                .Min = 2015
                .Max = 2040
                .SmallChange = 1
                .LinkedCell = "$A$1"
                .Display3DShading = False
            End With
            With .Spinners.Add(.Cells(1, 2).Left, .Cells(1, 1).Top, 18, .Cells(1, 1).Height)
                .Value = 11
                .Min = 1
                .Max = 12
                .SmallChange = 1
                .LinkedCell = "$B$1"
                .Display3DShading = False
            End With
          
            On Error Resume Next
                Kill DefltPath & "Monthly Sign in Sheet.xlsm"
                .Parent.SaveAs Filename:=DefltPath & "Monthly Sign in Sheet.xlsm", FileFormat:=xlOpenXMLWorkbookMacroEnabled, CreateBackup:=False
            On Error GoTo 0
      
    End With ' WS

End Sub

Holy cow this is incredible, thank you so much! You literally just shaved hours off my monthly scheduled tasks.
 
Upvote 0
Create new EXCEL File ready for use

VBA Code:
Public Sub atoCreate()

Dim WB As Workbook: Set WB = Workbooks.Add
Dim WS As Worksheet: Set WS = WB.Worksheets(1)
Dim YY As Long, MM As Long, B As Long
Dim DefltPath As String
DefltPath = Environ("USERPROFILE") & "\Desktop\"
YY = 2020
MM = 9
Dim Rng As Range
    With WS
        .Name = "Monthly Sign Sheet"
        .Activate
        ActiveWindow.DisplayGridlines = False
        With .Cells(1, 1)
        .Value = YY
        .HorizontalAlignment = xlCenter
        .VerticalAlignment = xlCenter
        .RowHeight = 25
        End With
      
        With .Cells(1, 2)
        .Value = MM
        .HorizontalAlignment = xlCenter
        .VerticalAlignment = xlCenter
        End With
      
        With .Cells(3, 1).Resize(1, 5)
            .Value = Array("Day/Date", "Time In", "Parent Signture", "Time Out", "Parent Signture")
      
            With .Interior
                .Pattern = xlSolid
                .Color = RGB(47, 117, 181)
            End With ' .Interior
            With .Font
                .Color = RGB(255, 255, 255)
            End With ' .Font
            .ColumnWidth = VBA.Array(15, 20, 25, 20, 25)
            .RowHeight = 30
            .HorizontalAlignment = xlCenter
            .VerticalAlignment = xlCenter
            .WrapText = False
        End With ' .Cells(3, 1).Resize(1, 5)
      
        With .Cells(4, 1).Resize(25, 1)
        .FormulaArray = "=TEXT(DATE($A$1,$B$1,(ROW()-ROW($A$4)+1))+(((CEILING((ROW()-ROW($A$4)+1)+IF(WEEKDAY(DATE($A$1,$B$1,1))=1,WEEKDAY(DATE($A$1,$B$1,1))+1-2,WEEKDAY(DATE($A$1,$B$1,1))-2),5)/5)-1)*2)+IF(WEEKDAY(DATE($A$1,$B$1,1))=1,1,0),""dddd"" & CHAR(10) & "" mm/dd/yyyy"")"
        .WrapText = True
        .RowHeight = 35
        .VerticalAlignment = xlCenter
        End With ' .Cells(4, 1).Resize(30, 1)
      
        With .Cells(3, 1).Resize(26, 5)
            For B = 7 To 12
                With .Borders(B)
                    .LineStyle = xlContinuous
                    .Color = RGB(0, 0, 0)
                    .Weight = xlThin
                End With
            Next
        End With ' .Cells(3, 1).Resize(31, 1)
  
  
             With Range("A27:E27")
             .FormatConditions.Add Type:=xlExpression, Formula1:= _
                 "=MONTH(TRIM(MID($A$27,FIND(CHAR(10),$A$27,1)+2,10)))<>$B$1"
             .FormatConditions(.FormatConditions.Count).SetFirstPriority
             With .FormatConditions(1).Font
                 .ThemeColor = xlThemeColorDark1
                 .TintAndShade = 0
             End With
             .FormatConditions(1).Borders(xlLeft).LineStyle = xlNone
             .FormatConditions(1).Borders(xlRight).LineStyle = xlNone
             .FormatConditions(1).Borders(xlBottom).LineStyle = xlNone
             .FormatConditions(1).StopIfTrue = False
            End With
          
             With Range("A28:E28")
             .FormatConditions.Add Type:=xlExpression, Formula1:= _
                 "=MONTH(TRIM(MID($A$28,FIND(CHAR(10),$A$28,1)+2,10)))<>$B$1"
             .FormatConditions(.FormatConditions.Count).SetFirstPriority
             With .FormatConditions(1).Font
                 .ThemeColor = xlThemeColorDark1
                 .TintAndShade = 0
             End With
             .FormatConditions(1).Borders(xlLeft).LineStyle = xlNone
             .FormatConditions(1).Borders(xlRight).LineStyle = xlNone
             .FormatConditions(1).Borders(xlBottom).LineStyle = xlNone
             .FormatConditions(1).StopIfTrue = False
            End With
            With .Spinners.Add(.Cells(1, 1).Left, .Cells(1, 1).Top, 18, .Cells(1, 1).Height)
                .Value = 2020
                .Min = 2015
                .Max = 2040
                .SmallChange = 1
                .LinkedCell = "$A$1"
                .Display3DShading = False
            End With
            With .Spinners.Add(.Cells(1, 2).Left, .Cells(1, 1).Top, 18, .Cells(1, 1).Height)
                .Value = 11
                .Min = 1
                .Max = 12
                .SmallChange = 1
                .LinkedCell = "$B$1"
                .Display3DShading = False
            End With
          
            On Error Resume Next
                Kill DefltPath & "Monthly Sign in Sheet.xlsm"
                .Parent.SaveAs Filename:=DefltPath & "Monthly Sign in Sheet.xlsm", FileFormat:=xlOpenXMLWorkbookMacroEnabled, CreateBackup:=False
            On Error GoTo 0
      
    End With ' WS

End Sub

Also though, sorry to be picky, but it goes into the next month. When I went to delete the extra rows for the next month, it wouldn't allow me to because it's an array. Is there a way to only show the selected month.

Also, this is a page I need to print and my parents will see it. Is there a way to say the months name rather than the number?
 
Upvote 0
T202010b.xlsm
ABCDE
1202011
2
3Day/DateTime InParent SignatureTime InParent Signature
4Monday
5Tue 03-Nov
6Wed 04-Nov
4aa
Cell Formulas
RangeFormula
A4A4=WORKDAY.INTL(DATE(A1,B1,0),1,1,HolidayList)
A5:A6A5=WORKDAY.INTL(A4,1,1,HolidayList)
Named Ranges
NameRefers ToCells
HolidayList='4aa'!$L$2:$L$3A4:A6


- includes Holiday List
- could edit for 1,2, 3, 4, or 5 day weeks
- could modify for alternating schedules
- customize the dates to your preference

Thank you for your help, I'm just not sure how to export this into excel.
 
Upvote 0
I need to wait before I help anymore till I know exactly what you want.
Your original post just showed a image of a worksheet and you wanted a script to do this for you so you did not have to do this manually.
I provided a script which you said worked perfectly but not if you want to use a year other then this year. So I modified my script to allow you to enter the month and year. And you never mentioned if this worked. But now your being supplied with formulas that may do what you want and you seem interested in doing this with formulas and now I think your saying you want to select the cell where you want this started not like in your image where it stats in Range("A1")
And I think you said you want user to enter April/2021 instead of 4/2021.

So the goal line keeps moving. Allowing the user to enter the Month name instead of 12 or 7 leaves open a for a lot of problems the user may enter Jan or January or Mar or March and so on.
So I'm going to wait till I'm sure what you want.
 
Upvote 0

Forum statistics

Threads
1,215,759
Messages
6,126,727
Members
449,332
Latest member
nokoloina

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top