Compile Error - Procedure to large.

DanSMT

Board Regular
Joined
Sep 13, 2019
Messages
203
Office Version
  1. 2013
Platform
  1. Windows
Hi all,

Having an issue running code. Is there any way to shrink down this data so excel can run it?

Sorry its lengthy.

VBA Code:
Private Sub SUBMITbt_Click()
Dim objWorkbook As Workbook
        'open the workbook with data
        Set objWorkbook = Workbooks.Open( _
            "H:\RECORD\MATRIX\matrix.xls")
Worksheets("Current").Activate

Dim Day As String
Dim Name As String
Dim nameFound As Boolean
Dim dayFound As Boolean
Dim nameAddress As Integer
Dim dayAddress As Integer
    Name = Textbox2.value
    Day = TextBox12.value
    Range("A6").Select
    nameFound = False
Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Name Then
        nameFound = True
Exit Do
    End If
        ActiveCell.Offset(1, 0).Select
Loop
    If nameFound = True Then
        nameAddress = ActiveCell.Row
    Else
        MsgBox "Name not found"
    End If
        Range("F1,G1,H1,I1,J1,K1,M1,N1,O1,P1,Q1,R1,S1,T1,U1,V1,W1,X1,Y1,Z1,AA1,AB1,AC1,AD1,AE1,AF1,AG1,AH1,AI1,AJ1,AK1,AL1,AM1,AN1,AO1,AP1,AQ1,AR1,AS1,AT1,AU1,AV1,AW1,AX1,AY1,AZ1,BA1,BB1").Select
        dayFound = False
    Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Day Then
        dayFound = True
Exit Do
    End If
        ActiveCell.Offset(0, 1).Select
Loop
    If dayFound = True Then
        dayAddress = ActiveCell.Column
    Else
        MsgBox "Day not found"
    End If
        Cells(nameAddress, dayAddress).Select
        ActiveCell = DTPicker1.value
'
    Name = Textbox2.value
    Day = TextBox13.value
    Range("A6").Select
    nameFound = False
Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Name Then
        nameFound = True
Exit Do
    End If
        ActiveCell.Offset(1, 0).Select
Loop
    If nameFound = True Then
        nameAddress = ActiveCell.Row
    Else
        MsgBox "Name not found"
    End If
        Range("F1,G1,H1,I1,J1,K1,M1,N1,O1,P1,Q1,R1,S1,T1,U1,V1,W1,X1,Y1,Z1,AA1,AB1,AC1,AD1,AE1,AF1,AG1,AH1,AI1,AJ1,AK1,AL1,AM1,AN1,AO1,AP1,AQ1,AR1,AS1,AT1,AU1,AV1,AW1,AX1,AY1,AZ1,BA1,BB1").Select
        dayFound = False
    Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Day Then
        dayFound = True
Exit Do
    End If
        ActiveCell.Offset(0, 1).Select
Loop
    If dayFound = True Then
        dayAddress = ActiveCell.Column
    Else
        MsgBox "Day not found"
    End If
        Cells(nameAddress, dayAddress).Select
        ActiveCell = DTPicker1.value
'
    Name = Textbox2.value
    Day = TextBox17.value
    Range("A6").Select
    nameFound = False
Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Name Then
        nameFound = True
Exit Do
    End If
        ActiveCell.Offset(1, 0).Select
Loop
    If nameFound = True Then
        nameAddress = ActiveCell.Row
    Else
        MsgBox "Name not found"
    End If
        Range("F1,G1,H1,I1,J1,K1,M1,N1,O1,P1,Q1,R1,S1,T1,U1,V1,W1,X1,Y1,Z1,AA1,AB1,AC1,AD1,AE1,AF1,AG1,AH1,AI1,AJ1,AK1,AL1,AM1,AN1,AO1,AP1,AQ1,AR1,AS1,AT1,AU1,AV1,AW1,AX1,AY1,AZ1,BA1,BB1").Select
        dayFound = False
    Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Day Then
        dayFound = True
Exit Do
    End If
        ActiveCell.Offset(0, 1).Select
Loop
    If dayFound = True Then
        dayAddress = ActiveCell.Column
    Else
        MsgBox "Day not found"
    End If
        Cells(nameAddress, dayAddress).Select
        ActiveCell = DTPicker1.value
'
    Name = Textbox2.value
    Day = TextBox16.value
    Range("A6").Select
    nameFound = False
Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Name Then
        nameFound = True
Exit Do
    End If
        ActiveCell.Offset(1, 0).Select
Loop
    If nameFound = True Then
        nameAddress = ActiveCell.Row
    Else
        MsgBox "Name not found"
    End If
        Range("F1,G1,H1,I1,J1,K1,M1,N1,O1,P1,Q1,R1,S1,T1,U1,V1,W1,X1,Y1,Z1,AA1,AB1,AC1,AD1,AE1,AF1,AG1,AH1,AI1,AJ1,AK1,AL1,AM1,AN1,AO1,AP1,AQ1,AR1,AS1,AT1,AU1,AV1,AW1,AX1,AY1,AZ1,BA1,BB1").Select
        dayFound = False
    Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Day Then
        dayFound = True
Exit Do
    End If
        ActiveCell.Offset(0, 1).Select
Loop
    If dayFound = True Then
        dayAddress = ActiveCell.Column
    Else
        MsgBox "Day not found"
    End If
        Cells(nameAddress, dayAddress).Select
        ActiveCell = DTPicker1.value
'
    Name = Textbox2.value
    Day = TextBox15.value
    Range("A6").Select
    nameFound = False
Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Name Then
        nameFound = True
Exit Do
    End If
        ActiveCell.Offset(1, 0).Select
Loop
    If nameFound = True Then
        nameAddress = ActiveCell.Row
    Else
        MsgBox "Name not found"
    End If
        Range("F1,G1,H1,I1,J1,K1,M1,N1,O1,P1,Q1,R1,S1,T1,U1,V1,W1,X1,Y1,Z1,AA1,AB1,AC1,AD1,AE1,AF1,AG1,AH1,AI1,AJ1,AK1,AL1,AM1,AN1,AO1,AP1,AQ1,AR1,AS1,AT1,AU1,AV1,AW1,AX1,AY1,AZ1,BA1,BB1").Select
        dayFound = False
    Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Day Then
        dayFound = True
Exit Do
    End If
        ActiveCell.Offset(0, 1).Select
Loop
    If dayFound = True Then
        dayAddress = ActiveCell.Column
    Else
        MsgBox "Day not found"
    End If
        Cells(nameAddress, dayAddress).Select
        ActiveCell = DTPicker1.value
'
    Name = Textbox2.value
    Day = TextBox14.value
    Range("A6").Select
    nameFound = False
Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Name Then
        nameFound = True
Exit Do
    End If
        ActiveCell.Offset(1, 0).Select
Loop
    If nameFound = True Then
        nameAddress = ActiveCell.Row
    Else
        MsgBox "Name not found"
    End If
        Range("F1,G1,H1,I1,J1,K1,M1,N1,O1,P1,Q1,R1,S1,T1,U1,V1,W1,X1,Y1,Z1,AA1,AB1,AC1,AD1,AE1,AF1,AG1,AH1,AI1,AJ1,AK1,AL1,AM1,AN1,AO1,AP1,AQ1,AR1,AS1,AT1,AU1,AV1,AW1,AX1,AY1,AZ1,BA1,BB1").Select
        dayFound = False
    Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Day Then
        dayFound = True
Exit Do
    End If
        ActiveCell.Offset(0, 1).Select
Loop
    If dayFound = True Then
        dayAddress = ActiveCell.Column
    Else
        MsgBox "Day not found"
    End If
        Cells(nameAddress, dayAddress).Select
        ActiveCell = DTPicker1.value
'
    Name = Textbox2.value
    Day = TextBox18.value
    Range("A6").Select
    nameFound = False
Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Name Then
        nameFound = True
Exit Do
    End If
        ActiveCell.Offset(1, 0).Select
Loop
    If nameFound = True Then
        nameAddress = ActiveCell.Row
    Else
        MsgBox "Name not found"
    End If
        Range("F1,G1,H1,I1,J1,K1,M1,N1,O1,P1,Q1,R1,S1,T1,U1,V1,W1,X1,Y1,Z1,AA1,AB1,AC1,AD1,AE1,AF1,AG1,AH1,AI1,AJ1,AK1,AL1,AM1,AN1,AO1,AP1,AQ1,AR1,AS1,AT1,AU1,AV1,AW1,AX1,AY1,AZ1,BA1,BB1").Select
        dayFound = False
    Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Day Then
        dayFound = True
Exit Do
    End If
        ActiveCell.Offset(0, 1).Select
Loop
    If dayFound = True Then
        dayAddress = ActiveCell.Column
    Else
        MsgBox "Day not found"
    End If
        Cells(nameAddress, dayAddress).Select
        ActiveCell = DTPicker1.value
'
    Name = Textbox2.value
    Day = TextBox19.value
    Range("A6").Select
    nameFound = False
Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Name Then
        nameFound = True
Exit Do
    End If
        ActiveCell.Offset(1, 0).Select
Loop
    If nameFound = True Then
        nameAddress = ActiveCell.Row
    Else
        MsgBox "Name not found"
    End If
        Range("F1,G1,H1,I1,J1,K1,M1,N1,O1,P1,Q1,R1,S1,T1,U1,V1,W1,X1,Y1,Z1,AA1,AB1,AC1,AD1,AE1,AF1,AG1,AH1,AI1,AJ1,AK1,AL1,AM1,AN1,AO1,AP1,AQ1,AR1,AS1,AT1,AU1,AV1,AW1,AX1,AY1,AZ1,BA1,BB1").Select
        dayFound = False
    Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Day Then
        dayFound = True
Exit Do
    End If
        ActiveCell.Offset(0, 1).Select
Loop
    If dayFound = True Then
        dayAddress = ActiveCell.Column
    Else
        MsgBox "Day not found"
    End If
        Cells(nameAddress, dayAddress).Select
        ActiveCell = DTPicker1.value
'
    Name = Textbox2.value
    Day = TextBox11.value
    Range("A6").Select
    nameFound = False
Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Name Then
        nameFound = True
Exit Do
    End If
        ActiveCell.Offset(1, 0).Select
Loop
    If nameFound = True Then
        nameAddress = ActiveCell.Row
    Else
        MsgBox "Name not found"
    End If
        Range("F1,G1,H1,I1,J1,K1,M1,N1,O1,P1,Q1,R1,S1,T1,U1,V1,W1,X1,Y1,Z1,AA1,AB1,AC1,AD1,AE1,AF1,AG1,AH1,AI1,AJ1,AK1,AL1,AM1,AN1,AO1,AP1,AQ1,AR1,AS1,AT1,AU1,AV1,AW1,AX1,AY1,AZ1,BA1,BB1").Select
        dayFound = False
    Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Day Then
        dayFound = True
Exit Do
    End If
        ActiveCell.Offset(0, 1).Select
Loop
    If dayFound = True Then
        dayAddress = ActiveCell.Column
    Else
        MsgBox "Day not found"
    End If
        Cells(nameAddress, dayAddress).Select
        ActiveCell = DTPicker1.value
'
    Name = TextBox3.value
    Day = TextBox12.value
    Range("A6").Select
    nameFound = False
Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Name Then
        nameFound = True
Exit Do
    End If
        ActiveCell.Offset(1, 0).Select
Loop
    If nameFound = True Then
        nameAddress = ActiveCell.Row
    Else
        MsgBox "Name not found"
    End If
        Range("F1,G1,H1,I1,J1,K1,M1,N1,O1,P1,Q1,R1,S1,T1,U1,V1,W1,X1,Y1,Z1,AA1,AB1,AC1,AD1,AE1,AF1,AG1,AH1,AI1,AJ1,AK1,AL1,AM1,AN1,AO1,AP1,AQ1,AR1,AS1,AT1,AU1,AV1,AW1,AX1,AY1,AZ1,BA1,BB1").Select
        dayFound = False
    Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Day Then
        dayFound = True
Exit Do
    End If
        ActiveCell.Offset(0, 1).Select
Loop
    If dayFound = True Then
        dayAddress = ActiveCell.Column
    Else
        MsgBox "Day not found"
    End If
        Cells(nameAddress, dayAddress).Select
        ActiveCell = DTPicker1.value
'
    Name = TextBox3.value
    Day = TextBox13.value
    Range("A6").Select
    nameFound = False
Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Name Then
        nameFound = True
Exit Do
    End If
        ActiveCell.Offset(1, 0).Select
Loop
    If nameFound = True Then
        nameAddress = ActiveCell.Row
    Else
        MsgBox "Name not found"
    End If
        Range("F1,G1,H1,I1,J1,K1,M1,N1,O1,P1,Q1,R1,S1,T1,U1,V1,W1,X1,Y1,Z1,AA1,AB1,AC1,AD1,AE1,AF1,AG1,AH1,AI1,AJ1,AK1,AL1,AM1,AN1,AO1,AP1,AQ1,AR1,AS1,AT1,AU1,AV1,AW1,AX1,AY1,AZ1,BA1,BB1").Select
        dayFound = False
    Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Day Then
        dayFound = True
Exit Do
    End If
        ActiveCell.Offset(0, 1).Select
Loop
    If dayFound = True Then
        dayAddress = ActiveCell.Column
    Else
        MsgBox "Day not found"
    End If
        Cells(nameAddress, dayAddress).Select
        ActiveCell = DTPicker1.value
'
    Name = TextBox3.value
    Day = TextBox17.value
    Range("A6").Select
    nameFound = False
Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Name Then
        nameFound = True
Exit Do
    End If
        ActiveCell.Offset(1, 0).Select
Loop
    If nameFound = True Then
        nameAddress = ActiveCell.Row
    Else
        MsgBox "Name not found"
    End If
        Range("F1,G1,H1,I1,J1,K1,M1,N1,O1,P1,Q1,R1,S1,T1,U1,V1,W1,X1,Y1,Z1,AA1,AB1,AC1,AD1,AE1,AF1,AG1,AH1,AI1,AJ1,AK1,AL1,AM1,AN1,AO1,AP1,AQ1,AR1,AS1,AT1,AU1,AV1,AW1,AX1,AY1,AZ1,BA1,BB1").Select
        dayFound = False
    Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Day Then
        dayFound = True
Exit Do
    End If
        ActiveCell.Offset(0, 1).Select
Loop
    If dayFound = True Then
        dayAddress = ActiveCell.Column
    Else
        MsgBox "Day not found"
    End If
        Cells(nameAddress, dayAddress).Select
        ActiveCell = DTPicker1.value
'
    Name = TextBox3.value
    Day = TextBox16.value
    Range("A6").Select
    nameFound = False
Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Name Then
        nameFound = True
Exit Do
    End If
        ActiveCell.Offset(1, 0).Select
Loop
    If nameFound = True Then
        nameAddress = ActiveCell.Row
    Else
        MsgBox "Name not found"
    End If
        Range("F1,G1,H1,I1,J1,K1,M1,N1,O1,P1,Q1,R1,S1,T1,U1,V1,W1,X1,Y1,Z1,AA1,AB1,AC1,AD1,AE1,AF1,AG1,AH1,AI1,AJ1,AK1,AL1,AM1,AN1,AO1,AP1,AQ1,AR1,AS1,AT1,AU1,AV1,AW1,AX1,AY1,AZ1,BA1,BB1").Select
        dayFound = False
    Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Day Then
        dayFound = True
Exit Do
    End If
        ActiveCell.Offset(0, 1).Select
Loop
    If dayFound = True Then
        dayAddress = ActiveCell.Column
    Else
        MsgBox "Day not found"
    End If
        Cells(nameAddress, dayAddress).Select
        ActiveCell = DTPicker1.value
'
    Name = TextBox3.value
    Day = TextBox15.value
    Range("A6").Select
    nameFound = False
Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Name Then
        nameFound = True
Exit Do
    End If
        ActiveCell.Offset(1, 0).Select
Loop
    If nameFound = True Then
        nameAddress = ActiveCell.Row
    Else
        MsgBox "Name not found"
    End If
        Range("F1,G1,H1,I1,J1,K1,M1,N1,O1,P1,Q1,R1,S1,T1,U1,V1,W1,X1,Y1,Z1,AA1,AB1,AC1,AD1,AE1,AF1,AG1,AH1,AI1,AJ1,AK1,AL1,AM1,AN1,AO1,AP1,AQ1,AR1,AS1,AT1,AU1,AV1,AW1,AX1,AY1,AZ1,BA1,BB1").Select
        dayFound = False
    Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Day Then
        dayFound = True
Exit Do
    End If
        ActiveCell.Offset(0, 1).Select
Loop
    If dayFound = True Then
        dayAddress = ActiveCell.Column
    Else
        MsgBox "Day not found"
    End If
        Cells(nameAddress, dayAddress).Select
        ActiveCell = DTPicker1.value
'
    Name = TextBox3.value
    Day = TextBox14.value
    Range("A6").Select
    nameFound = False
Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Name Then
        nameFound = True
Exit Do
    End If
        ActiveCell.Offset(1, 0).Select
Loop
    If nameFound = True Then
        nameAddress = ActiveCell.Row
    Else
        MsgBox "Name not found"
    End If
        Range("F1,G1,H1,I1,J1,K1,M1,N1,O1,P1,Q1,R1,S1,T1,U1,V1,W1,X1,Y1,Z1,AA1,AB1,AC1,AD1,AE1,AF1,AG1,AH1,AI1,AJ1,AK1,AL1,AM1,AN1,AO1,AP1,AQ1,AR1,AS1,AT1,AU1,AV1,AW1,AX1,AY1,AZ1,BA1,BB1").Select
        dayFound = False
    Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Day Then
        dayFound = True
Exit Do
    End If
        ActiveCell.Offset(0, 1).Select
Loop
    If dayFound = True Then
        dayAddress = ActiveCell.Column
    Else
        MsgBox "Day not found"
    End If
        Cells(nameAddress, dayAddress).Select
        ActiveCell = DTPicker1.value
'
    Name = TextBox3.value
    Day = TextBox18.value
    Range("A6").Select
    nameFound = False
Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Name Then
        nameFound = True
Exit Do
    End If
        ActiveCell.Offset(1, 0).Select
Loop
    If nameFound = True Then
        nameAddress = ActiveCell.Row
    Else
        MsgBox "Name not found"
    End If
        Range("F1,G1,H1,I1,J1,K1,M1,N1,O1,P1,Q1,R1,S1,T1,U1,V1,W1,X1,Y1,Z1,AA1,AB1,AC1,AD1,AE1,AF1,AG1,AH1,AI1,AJ1,AK1,AL1,AM1,AN1,AO1,AP1,AQ1,AR1,AS1,AT1,AU1,AV1,AW1,AX1,AY1,AZ1,BA1,BB1").Select
        dayFound = False
    Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Day Then
        dayFound = True
Exit Do
    End If
        ActiveCell.Offset(0, 1).Select
Loop
    If dayFound = True Then
        dayAddress = ActiveCell.Column
    Else
        MsgBox "Day not found"
    End If
        Cells(nameAddress, dayAddress).Select
        ActiveCell = DTPicker1.value
'
    Name = TextBox3.value
    Day = TextBox19.value
    Range("A6").Select
    nameFound = False
Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Name Then
        nameFound = True
Exit Do
    End If
        ActiveCell.Offset(1, 0).Select
Loop
    If nameFound = True Then
        nameAddress = ActiveCell.Row
    Else
        MsgBox "Name not found"
    End If
        Range("F1,G1,H1,I1,J1,K1,M1,N1,O1,P1,Q1,R1,S1,T1,U1,V1,W1,X1,Y1,Z1,AA1,AB1,AC1,AD1,AE1,AF1,AG1,AH1,AI1,AJ1,AK1,AL1,AM1,AN1,AO1,AP1,AQ1,AR1,AS1,AT1,AU1,AV1,AW1,AX1,AY1,AZ1,BA1,BB1").Select
        dayFound = False
    Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Day Then
        dayFound = True
Exit Do
    End If
        ActiveCell.Offset(0, 1).Select
Loop
    If dayFound = True Then
        dayAddress = ActiveCell.Column
    Else
        MsgBox "Day not found"
    End If
        Cells(nameAddress, dayAddress).Select
        ActiveCell = DTPicker1.value
'
    Name = TextBox3.value
    Day = TextBox11.value
    Range("A6").Select
    nameFound = False
Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Name Then
        nameFound = True
Exit Do
    End If
        ActiveCell.Offset(1, 0).Select
Loop
    If nameFound = True Then
        nameAddress = ActiveCell.Row
    Else
        MsgBox "Name not found"
    End If
        Range("F1,G1,H1,I1,J1,K1,M1,N1,O1,P1,Q1,R1,S1,T1,U1,V1,W1,X1,Y1,Z1,AA1,AB1,AC1,AD1,AE1,AF1,AG1,AH1,AI1,AJ1,AK1,AL1,AM1,AN1,AO1,AP1,AQ1,AR1,AS1,AT1,AU1,AV1,AW1,AX1,AY1,AZ1,BA1,BB1").Select
        dayFound = False
    Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Day Then
        dayFound = True
Exit Do
    End If
        ActiveCell.Offset(0, 1).Select
Loop
    If dayFound = True Then
        dayAddress = ActiveCell.Column
    Else
        MsgBox "Day not found"
    End If
        Cells(nameAddress, dayAddress).Select
        ActiveCell = DTPicker1.value
'
    Name = TextBox7.value
    Day = TextBox12.value
    Range("A6").Select
    nameFound = False
Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Name Then
        nameFound = True
Exit Do
    End If
        ActiveCell.Offset(1, 0).Select
Loop
    If nameFound = True Then
        nameAddress = ActiveCell.Row
    Else
        MsgBox "Name not found"
    End If
        Range("F1,G1,H1,I1,J1,K1,M1,N1,O1,P1,Q1,R1,S1,T1,U1,V1,W1,X1,Y1,Z1,AA1,AB1,AC1,AD1,AE1,AF1,AG1,AH1,AI1,AJ1,AK1,AL1,AM1,AN1,AO1,AP1,AQ1,AR1,AS1,AT1,AU1,AV1,AW1,AX1,AY1,AZ1,BA1,BB1").Select
        dayFound = False
    Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Day Then
        dayFound = True
Exit Do
    End If
        ActiveCell.Offset(0, 1).Select
Loop
    If dayFound = True Then
        dayAddress = ActiveCell.Column
    Else
        MsgBox "Day not found"
    End If
        Cells(nameAddress, dayAddress).Select
        ActiveCell = DTPicker1.value
'
    Name = TextBox7.value
    Day = TextBox13.value
    Range("A6").Select
    nameFound = False
Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Name Then
        nameFound = True
Exit Do
    End If
        ActiveCell.Offset(1, 0).Select
Loop
    If nameFound = True Then
        nameAddress = ActiveCell.Row
    Else
        MsgBox "Name not found"
    End If
        Range("F1,G1,H1,I1,J1,K1,M1,N1,O1,P1,Q1,R1,S1,T1,U1,V1,W1,X1,Y1,Z1,AA1,AB1,AC1,AD1,AE1,AF1,AG1,AH1,AI1,AJ1,AK1,AL1,AM1,AN1,AO1,AP1,AQ1,AR1,AS1,AT1,AU1,AV1,AW1,AX1,AY1,AZ1,BA1,BB1").Select
        dayFound = False
    Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Day Then
        dayFound = True
Exit Do
    End If
        ActiveCell.Offset(0, 1).Select
Loop
    If dayFound = True Then
        dayAddress = ActiveCell.Column
    Else
        MsgBox "Day not found"
    End If
        Cells(nameAddress, dayAddress).Select
        ActiveCell = DTPicker1.value
'
    Name = TextBox7.value
    Day = TextBox17.value
    Range("A6").Select
    nameFound = False
Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Name Then
        nameFound = True
Exit Do
    End If
        ActiveCell.Offset(1, 0).Select
Loop
    If nameFound = True Then
        nameAddress = ActiveCell.Row
    Else
        MsgBox "Name not found"
    End If
        Range("F1,G1,H1,I1,J1,K1,M1,N1,O1,P1,Q1,R1,S1,T1,U1,V1,W1,X1,Y1,Z1,AA1,AB1,AC1,AD1,AE1,AF1,AG1,AH1,AI1,AJ1,AK1,AL1,AM1,AN1,AO1,AP1,AQ1,AR1,AS1,AT1,AU1,AV1,AW1,AX1,AY1,AZ1,BA1,BB1").Select
        dayFound = False
    Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Day Then
        dayFound = True
Exit Do
    End If
        ActiveCell.Offset(0, 1).Select
Loop
    If dayFound = True Then
        dayAddress = ActiveCell.Column
    Else
        MsgBox "Day not found"
    End If
        Cells(nameAddress, dayAddress).Select
        ActiveCell = DTPicker1.value
'
    Name = TextBox7.value
    Day = TextBox16.value
    Range("A6").Select
    nameFound = False
Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Name Then
        nameFound = True
Exit Do
    End If
        ActiveCell.Offset(1, 0).Select
Loop
    If nameFound = True Then
        nameAddress = ActiveCell.Row
    Else
        MsgBox "Name not found"
    End If
        Range("F1,G1,H1,I1,J1,K1,M1,N1,O1,P1,Q1,R1,S1,T1,U1,V1,W1,X1,Y1,Z1,AA1,AB1,AC1,AD1,AE1,AF1,AG1,AH1,AI1,AJ1,AK1,AL1,AM1,AN1,AO1,AP1,AQ1,AR1,AS1,AT1,AU1,AV1,AW1,AX1,AY1,AZ1,BA1,BB1").Select
        dayFound = False
    Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Day Then
        dayFound = True
Exit Do
    End If
        ActiveCell.Offset(0, 1).Select
Loop
    If dayFound = True Then
        dayAddress = ActiveCell.Column
    Else
        MsgBox "Day not found"
    End If
        Cells(nameAddress, dayAddress).Select
        ActiveCell = DTPicker1.value
'
    Name = TextBox7.value
    Day = TextBox15.value
    Range("A6").Select
    nameFound = False
Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Name Then
        nameFound = True
Exit Do
    End If
        ActiveCell.Offset(1, 0).Select
Loop
    If nameFound = True Then
        nameAddress = ActiveCell.Row
    Else
        MsgBox "Name not found"
    End If
        Range("F1,G1,H1,I1,J1,K1,M1,N1,O1,P1,Q1,R1,S1,T1,U1,V1,W1,X1,Y1,Z1,AA1,AB1,AC1,AD1,AE1,AF1,AG1,AH1,AI1,AJ1,AK1,AL1,AM1,AN1,AO1,AP1,AQ1,AR1,AS1,AT1,AU1,AV1,AW1,AX1,AY1,AZ1,BA1,BB1").Select
        dayFound = False
    Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Day Then
        dayFound = True
Exit Do
    End If
        ActiveCell.Offset(0, 1).Select
Loop
    If dayFound = True Then
        dayAddress = ActiveCell.Column
    Else
        MsgBox "Day not found"
    End If
        Cells(nameAddress, dayAddress).Select
        ActiveCell = DTPicker1.value
'
    Name = TextBox7.value
    Day = TextBox14.value
    Range("A6").Select
    nameFound = False
Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Name Then
        nameFound = True
Exit Do
    End If
        ActiveCell.Offset(1, 0).Select
Loop
    If nameFound = True Then
        nameAddress = ActiveCell.Row
    Else
        MsgBox "Name not found"
    End If
        Range("F1,G1,H1,I1,J1,K1,M1,N1,O1,P1,Q1,R1,S1,T1,U1,V1,W1,X1,Y1,Z1,AA1,AB1,AC1,AD1,AE1,AF1,AG1,AH1,AI1,AJ1,AK1,AL1,AM1,AN1,AO1,AP1,AQ1,AR1,AS1,AT1,AU1,AV1,AW1,AX1,AY1,AZ1,BA1,BB1").Select
        dayFound = False
    Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Day Then
        dayFound = True
Exit Do
    End If
        ActiveCell.Offset(0, 1).Select
Loop
    If dayFound = True Then
        dayAddress = ActiveCell.Column
    Else
        MsgBox "Day not found"
    End If
        Cells(nameAddress, dayAddress).Select
        ActiveCell = DTPicker1.value
'
    Name = TextBox7.value
    Day = TextBox18.value
    Range("A6").Select
    nameFound = False
Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Name Then
        nameFound = True
Exit Do
    End If
        ActiveCell.Offset(1, 0).Select
Loop
    If nameFound = True Then
        nameAddress = ActiveCell.Row
    Else
        MsgBox "Name not found"
    End If
        Range("F1,G1,H1,I1,J1,K1,M1,N1,O1,P1,Q1,R1,S1,T1,U1,V1,W1,X1,Y1,Z1,AA1,AB1,AC1,AD1,AE1,AF1,AG1,AH1,AI1,AJ1,AK1,AL1,AM1,AN1,AO1,AP1,AQ1,AR1,AS1,AT1,AU1,AV1,AW1,AX1,AY1,AZ1,BA1,BB1").Select
        dayFound = False
    Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Day Then
        dayFound = True
Exit Do
    End If
        ActiveCell.Offset(0, 1).Select
Loop
    If dayFound = True Then
        dayAddress = ActiveCell.Column
    Else
        MsgBox "Day not found"
    End If
        Cells(nameAddress, dayAddress).Select
        ActiveCell = DTPicker1.value
'
    Name = TextBox7.value
    Day = TextBox19.value
    Range("A6").Select
    nameFound = False
Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Name Then
        nameFound = True
Exit Do
    End If
        ActiveCell.Offset(1, 0).Select
Loop
    If nameFound = True Then
        nameAddress = ActiveCell.Row
    Else
        MsgBox "Name not found"
    End If
        Range("F1,G1,H1,I1,J1,K1,M1,N1,O1,P1,Q1,R1,S1,T1,U1,V1,W1,X1,Y1,Z1,AA1,AB1,AC1,AD1,AE1,AF1,AG1,AH1,AI1,AJ1,AK1,AL1,AM1,AN1,AO1,AP1,AQ1,AR1,AS1,AT1,AU1,AV1,AW1,AX1,AY1,AZ1,BA1,BB1").Select
        dayFound = False
    Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Day Then
        dayFound = True
Exit Do
    End If
        ActiveCell.Offset(0, 1).Select
Loop
    If dayFound = True Then
        dayAddress = ActiveCell.Column
    Else
        MsgBox "Day not found"
    End If
        Cells(nameAddress, dayAddress).Select
        ActiveCell = DTPicker1.value
'
    Name = TextBox7.value
    Day = TextBox11.value
    Range("A6").Select
    nameFound = False
Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Name Then
        nameFound = True
Exit Do
    End If
        ActiveCell.Offset(1, 0).Select
Loop
    If nameFound = True Then
        nameAddress = ActiveCell.Row
    Else
        MsgBox "Name not found"
    End If
        Range("F1,G1,H1,I1,J1,K1,M1,N1,O1,P1,Q1,R1,S1,T1,U1,V1,W1,X1,Y1,Z1,AA1,AB1,AC1,AD1,AE1,AF1,AG1,AH1,AI1,AJ1,AK1,AL1,AM1,AN1,AO1,AP1,AQ1,AR1,AS1,AT1,AU1,AV1,AW1,AX1,AY1,AZ1,BA1,BB1").Select
        dayFound = False
    Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Day Then
        dayFound = True
Exit Do
    End If
        ActiveCell.Offset(0, 1).Select
Loop
    If dayFound = True Then
        dayAddress = ActiveCell.Column
    Else
        MsgBox "Day not found"
    End If
        Cells(nameAddress, dayAddress).Select
        ActiveCell = DTPicker1.value
'
    Name = TextBox6.value
    Day = TextBox12.value
    Range("A6").Select
    nameFound = False
Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Name Then
        nameFound = True
Exit Do
    End If
        ActiveCell.Offset(1, 0).Select
Loop
    If nameFound = True Then
        nameAddress = ActiveCell.Row
    Else
        MsgBox "Name not found"
    End If
        Range("F1,G1,H1,I1,J1,K1,M1,N1,O1,P1,Q1,R1,S1,T1,U1,V1,W1,X1,Y1,Z1,AA1,AB1,AC1,AD1,AE1,AF1,AG1,AH1,AI1,AJ1,AK1,AL1,AM1,AN1,AO1,AP1,AQ1,AR1,AS1,AT1,AU1,AV1,AW1,AX1,AY1,AZ1,BA1,BB1").Select
        dayFound = False
    Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Day Then
        dayFound = True
Exit Do
    End If
        ActiveCell.Offset(0, 1).Select
Loop
    If dayFound = True Then
        dayAddress = ActiveCell.Column
    Else
        MsgBox "Day not found"
    End If
        Cells(nameAddress, dayAddress).Select
        ActiveCell = DTPicker1.value
'
    Name = TextBox6.value
    Day = TextBox13.value
    Range("A6").Select
    nameFound = False
Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Name Then
        nameFound = True
Exit Do
    End If
        ActiveCell.Offset(1, 0).Select
Loop
    If nameFound = True Then
        nameAddress = ActiveCell.Row
    Else
        MsgBox "Name not found"
    End If
        Range("F1,G1,H1,I1,J1,K1,M1,N1,O1,P1,Q1,R1,S1,T1,U1,V1,W1,X1,Y1,Z1,AA1,AB1,AC1,AD1,AE1,AF1,AG1,AH1,AI1,AJ1,AK1,AL1,AM1,AN1,AO1,AP1,AQ1,AR1,AS1,AT1,AU1,AV1,AW1,AX1,AY1,AZ1,BA1,BB1").Select
        dayFound = False
    Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Day Then
        dayFound = True
Exit Do
    End If
        ActiveCell.Offset(0, 1).Select
Loop
    If dayFound = True Then
        dayAddress = ActiveCell.Column
    Else
        MsgBox "Day not found"
    End If
        Cells(nameAddress, dayAddress).Select
        ActiveCell = DTPicker1.value
'
    Name = TextBox6.value
    Day = TextBox17.value
    Range("A6").Select
    nameFound = False
Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Name Then
        nameFound = True
Exit Do
    End If
        ActiveCell.Offset(1, 0).Select
Loop
    If nameFound = True Then
        nameAddress = ActiveCell.Row
    Else
        MsgBox "Name not found"
    End If
        Range("F1,G1,H1,I1,J1,K1,M1,N1,O1,P1,Q1,R1,S1,T1,U1,V1,W1,X1,Y1,Z1,AA1,AB1,AC1,AD1,AE1,AF1,AG1,AH1,AI1,AJ1,AK1,AL1,AM1,AN1,AO1,AP1,AQ1,AR1,AS1,AT1,AU1,AV1,AW1,AX1,AY1,AZ1,BA1,BB1").Select
        dayFound = False
    Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Day Then
        dayFound = True
Exit Do
    End If
        ActiveCell.Offset(0, 1).Select
Loop
    If dayFound = True Then
        dayAddress = ActiveCell.Column
    Else
        MsgBox "Day not found"
    End If
        Cells(nameAddress, dayAddress).Select
        ActiveCell = DTPicker1.value
'
    Name = TextBox6.value
    Day = TextBox16.value
    Range("A6").Select
    nameFound = False
Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Name Then
        nameFound = True
Exit Do
    End If
        ActiveCell.Offset(1, 0).Select
Loop
    If nameFound = True Then
        nameAddress = ActiveCell.Row
    Else
        MsgBox "Name not found"
    End If
        Range("F1,G1,H1,I1,J1,K1,M1,N1,O1,P1,Q1,R1,S1,T1,U1,V1,W1,X1,Y1,Z1,AA1,AB1,AC1,AD1,AE1,AF1,AG1,AH1,AI1,AJ1,AK1,AL1,AM1,AN1,AO1,AP1,AQ1,AR1,AS1,AT1,AU1,AV1,AW1,AX1,AY1,AZ1,BA1,BB1").Select
        dayFound = False
    Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Day Then
        dayFound = True
Exit Do
    End If
        ActiveCell.Offset(0, 1).Select
Loop
    If dayFound = True Then
        dayAddress = ActiveCell.Column
    Else
        MsgBox "Day not found"
    End If
        Cells(nameAddress, dayAddress).Select
        ActiveCell = DTPicker1.value
'
    Name = TextBox6.value
    Day = TextBox15.value
    Range("A6").Select
    nameFound = False
Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Name Then
        nameFound = True
Exit Do
    End If
        ActiveCell.Offset(1, 0).Select
Loop
    If nameFound = True Then
        nameAddress = ActiveCell.Row
    Else
        MsgBox "Name not found"
    End If
        Range("F1,G1,H1,I1,J1,K1,M1,N1,O1,P1,Q1,R1,S1,T1,U1,V1,W1,X1,Y1,Z1,AA1,AB1,AC1,AD1,AE1,AF1,AG1,AH1,AI1,AJ1,AK1,AL1,AM1,AN1,AO1,AP1,AQ1,AR1,AS1,AT1,AU1,AV1,AW1,AX1,AY1,AZ1,BA1,BB1").Select
        dayFound = False
    Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Day Then
        dayFound = True
Exit Do
    End If
        ActiveCell.Offset(0, 1).Select
Loop
    If dayFound = True Then
        dayAddress = ActiveCell.Column
    Else
        MsgBox "Day not found"
    End If
        Cells(nameAddress, dayAddress).Select
        ActiveCell = DTPicker1.value
'
    Name = TextBox6.value
    Day = TextBox14.value
    Range("A6").Select
    nameFound = False
Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Name Then
        nameFound = True
Exit Do
    End If
        ActiveCell.Offset(1, 0).Select
Loop
    If nameFound = True Then
        nameAddress = ActiveCell.Row
    Else
        MsgBox "Name not found"
    End If
        Range("F1,G1,H1,I1,J1,K1,M1,N1,O1,P1,Q1,R1,S1,T1,U1,V1,W1,X1,Y1,Z1,AA1,AB1,AC1,AD1,AE1,AF1,AG1,AH1,AI1,AJ1,AK1,AL1,AM1,AN1,AO1,AP1,AQ1,AR1,AS1,AT1,AU1,AV1,AW1,AX1,AY1,AZ1,BA1,BB1").Select
        dayFound = False
    Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Day Then
        dayFound = True
Exit Do
    End If
        ActiveCell.Offset(0, 1).Select
Loop
    If dayFound = True Then
        dayAddress = ActiveCell.Column
    Else
        MsgBox "Day not found"
    End If
        Cells(nameAddress, dayAddress).Select
        ActiveCell = DTPicker1.value
'
    Name = TextBox6.value
    Day = TextBox18.value
    Range("A6").Select
    nameFound = False
Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Name Then
        nameFound = True
Exit Do
    End If
        ActiveCell.Offset(1, 0).Select
Loop
    If nameFound = True Then
        nameAddress = ActiveCell.Row
    Else
        MsgBox "Name not found"
    End If
        Range("F1,G1,H1,I1,J1,K1,M1,N1,O1,P1,Q1,R1,S1,T1,U1,V1,W1,X1,Y1,Z1,AA1,AB1,AC1,AD1,AE1,AF1,AG1,AH1,AI1,AJ1,AK1,AL1,AM1,AN1,AO1,AP1,AQ1,AR1,AS1,AT1,AU1,AV1,AW1,AX1,AY1,AZ1,BA1,BB1").Select
        dayFound = False
    Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Day Then
        dayFound = True
Exit Do
    End If
        ActiveCell.Offset(0, 1).Select
Loop
    If dayFound = True Then
        dayAddress = ActiveCell.Column
    Else
        MsgBox "Day not found"
    End If
        Cells(nameAddress, dayAddress).Select
        ActiveCell = DTPicker1.value
'
    Name = TextBox6.value
    Day = TextBox19.value
    Range("A6").Select
    nameFound = False
Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Name Then
        nameFound = True
Exit Do
    End If
        ActiveCell.Offset(1, 0).Select
Loop
    If nameFound = True Then
        nameAddress = ActiveCell.Row
    Else
        MsgBox "Name not found"
    End If
        Range("F1,G1,H1,I1,J1,K1,M1,N1,O1,P1,Q1,R1,S1,T1,U1,V1,W1,X1,Y1,Z1,AA1,AB1,AC1,AD1,AE1,AF1,AG1,AH1,AI1,AJ1,AK1,AL1,AM1,AN1,AO1,AP1,AQ1,AR1,AS1,AT1,AU1,AV1,AW1,AX1,AY1,AZ1,BA1,BB1").Select
        dayFound = False
    Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Day Then
        dayFound = True
Exit Do
    End If
        ActiveCell.Offset(0, 1).Select
Loop
    If dayFound = True Then
        dayAddress = ActiveCell.Column
    Else
        MsgBox "Day not found"
    End If
        Cells(nameAddress, dayAddress).Select
        ActiveCell = DTPicker1.value
'
    Name = TextBox6.value
    Day = TextBox11.value
    Range("A6").Select
    nameFound = False
Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Name Then
        nameFound = True
Exit Do
    End If
        ActiveCell.Offset(1, 0).Select
Loop
    If nameFound = True Then
        nameAddress = ActiveCell.Row
    Else
        MsgBox "Name not found"
    End If
        Range("F1,G1,H1,I1,J1,K1,M1,N1,O1,P1,Q1,R1,S1,T1,U1,V1,W1,X1,Y1,Z1,AA1,AB1,AC1,AD1,AE1,AF1,AG1,AH1,AI1,AJ1,AK1,AL1,AM1,AN1,AO1,AP1,AQ1,AR1,AS1,AT1,AU1,AV1,AW1,AX1,AY1,AZ1,BA1,BB1").Select
        dayFound = False
    Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Day Then
        dayFound = True
Exit Do
    End If
        ActiveCell.Offset(0, 1).Select
Loop
    If dayFound = True Then
        dayAddress = ActiveCell.Column
    Else
        MsgBox "Day not found"
    End If
        Cells(nameAddress, dayAddress).Select
        ActiveCell = DTPicker1.value
'
    Name = TextBox5.value
    Day = TextBox12.value
    Range("A6").Select
    nameFound = False
Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Name Then
        nameFound = True
Exit Do
    End If
        ActiveCell.Offset(1, 0).Select
Loop
    If nameFound = True Then
        nameAddress = ActiveCell.Row
    Else
        MsgBox "Name not found"
    End If
        Range("F1,G1,H1,I1,J1,K1,M1,N1,O1,P1,Q1,R1,S1,T1,U1,V1,W1,X1,Y1,Z1,AA1,AB1,AC1,AD1,AE1,AF1,AG1,AH1,AI1,AJ1,AK1,AL1,AM1,AN1,AO1,AP1,AQ1,AR1,AS1,AT1,AU1,AV1,AW1,AX1,AY1,AZ1,BA1,BB1").Select
        dayFound = False
    Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Day Then
        dayFound = True
Exit Do
    End If
        ActiveCell.Offset(0, 1).Select
Loop
    If dayFound = True Then
        dayAddress = ActiveCell.Column
    Else
        MsgBox "Day not found"
    End If
        Cells(nameAddress, dayAddress).Select
        ActiveCell = DTPicker1.value
'
    Name = TextBox5.value
    Day = TextBox13.value
    Range("A6").Select
    nameFound = False
Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Name Then
        nameFound = True
Exit Do
    End If
        ActiveCell.Offset(1, 0).Select
Loop
    If nameFound = True Then
        nameAddress = ActiveCell.Row
    Else
        MsgBox "Name not found"
    End If
        Range("F1,G1,H1,I1,J1,K1,M1,N1,O1,P1,Q1,R1,S1,T1,U1,V1,W1,X1,Y1,Z1,AA1,AB1,AC1,AD1,AE1,AF1,AG1,AH1,AI1,AJ1,AK1,AL1,AM1,AN1,AO1,AP1,AQ1,AR1,AS1,AT1,AU1,AV1,AW1,AX1,AY1,AZ1,BA1,BB1").Select
        dayFound = False
    Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Day Then
        dayFound = True
Exit Do
    End If
        ActiveCell.Offset(0, 1).Select
Loop
    If dayFound = True Then
        dayAddress = ActiveCell.Column
    Else
        MsgBox "Day not found"
    End If
        Cells(nameAddress, dayAddress).Select
        ActiveCell = DTPicker1.value
'
    Name = TextBox5.value
    Day = TextBox17.value
    Range("A6").Select
    nameFound = False
Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Name Then
        nameFound = True
Exit Do
    End If
        ActiveCell.Offset(1, 0).Select
Loop
    If nameFound = True Then
        nameAddress = ActiveCell.Row
    Else
        MsgBox "Name not found"
    End If
        Range("F1,G1,H1,I1,J1,K1,M1,N1,O1,P1,Q1,R1,S1,T1,U1,V1,W1,X1,Y1,Z1,AA1,AB1,AC1,AD1,AE1,AF1,AG1,AH1,AI1,AJ1,AK1,AL1,AM1,AN1,AO1,AP1,AQ1,AR1,AS1,AT1,AU1,AV1,AW1,AX1,AY1,AZ1,BA1,BB1").Select
        dayFound = False
    Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Day Then
        dayFound = True
Exit Do
    End If
        ActiveCell.Offset(0, 1).Select
Loop
    If dayFound = True Then
        dayAddress = ActiveCell.Column
    Else
        MsgBox "Day not found"
    End If
        Cells(nameAddress, dayAddress).Select
        ActiveCell = DTPicker1.value
'
    Name = TextBox5.value
    Day = TextBox16.value
    Range("A6").Select
    nameFound = False
Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Name Then
        nameFound = True
Exit Do
    End If
        ActiveCell.Offset(1, 0).Select
Loop
    If nameFound = True Then
        nameAddress = ActiveCell.Row
    Else
        MsgBox "Name not found"
    End If
        Range("F1,G1,H1,I1,J1,K1,M1,N1,O1,P1,Q1,R1,S1,T1,U1,V1,W1,X1,Y1,Z1,AA1,AB1,AC1,AD1,AE1,AF1,AG1,AH1,AI1,AJ1,AK1,AL1,AM1,AN1,AO1,AP1,AQ1,AR1,AS1,AT1,AU1,AV1,AW1,AX1,AY1,AZ1,BA1,BB1").Select
        dayFound = False
    Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Day Then
        dayFound = True
Exit Do
    End If
        ActiveCell.Offset(0, 1).Select
Loop
    If dayFound = True Then
        dayAddress = ActiveCell.Column
    Else
        MsgBox "Day not found"
    End If
        Cells(nameAddress, dayAddress).Select
        ActiveCell = DTPicker1.value
'
    Name = TextBox5.value
    Day = TextBox15.value
    Range("A6").Select
    nameFound = False
Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Name Then
        nameFound = True
Exit Do
    End If
        ActiveCell.Offset(1, 0).Select
Loop
    If nameFound = True Then
        nameAddress = ActiveCell.Row
    Else
        MsgBox "Name not found"
    End If
        Range("F1,G1,H1,I1,J1,K1,M1,N1,O1,P1,Q1,R1,S1,T1,U1,V1,W1,X1,Y1,Z1,AA1,AB1,AC1,AD1,AE1,AF1,AG1,AH1,AI1,AJ1,AK1,AL1,AM1,AN1,AO1,AP1,AQ1,AR1,AS1,AT1,AU1,AV1,AW1,AX1,AY1,AZ1,BA1,BB1").Select
        dayFound = False
    Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Day Then
        dayFound = True
Exit Do
    End If
        ActiveCell.Offset(0, 1).Select
Loop
    If dayFound = True Then
        dayAddress = ActiveCell.Column
    Else
        MsgBox "Day not found"
    End If
        Cells(nameAddress, dayAddress).Select
        ActiveCell = DTPicker1.value
'
    Name = TextBox5.value
    Day = TextBox14.value
    Range("A6").Select
    nameFound = False
Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Name Then
        nameFound = True
Exit Do
    End If
        ActiveCell.Offset(1, 0).Select
Loop
    If nameFound = True Then
        nameAddress = ActiveCell.Row
    Else
        MsgBox "Name not found"
    End If
        Range("F1,G1,H1,I1,J1,K1,M1,N1,O1,P1,Q1,R1,S1,T1,U1,V1,W1,X1,Y1,Z1,AA1,AB1,AC1,AD1,AE1,AF1,AG1,AH1,AI1,AJ1,AK1,AL1,AM1,AN1,AO1,AP1,AQ1,AR1,AS1,AT1,AU1,AV1,AW1,AX1,AY1,AZ1,BA1,BB1").Select
        dayFound = False
    Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Day Then
        dayFound = True
Exit Do
    End If
        ActiveCell.Offset(0, 1).Select
Loop
    If dayFound = True Then
        dayAddress = ActiveCell.Column
    Else
        MsgBox "Day not found"
    End If
        Cells(nameAddress, dayAddress).Select
        ActiveCell = DTPicker1.value
'
    Name = TextBox5.value
    Day = TextBox18.value
    Range("A6").Select
    nameFound = False
Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Name Then
        nameFound = True
Exit Do
    End If
        ActiveCell.Offset(1, 0).Select
Loop
    If nameFound = True Then
        nameAddress = ActiveCell.Row
    Else
        MsgBox "Name not found"
    End If
        Range("F1,G1,H1,I1,J1,K1,M1,N1,O1,P1,Q1,R1,S1,T1,U1,V1,W1,X1,Y1,Z1,AA1,AB1,AC1,AD1,AE1,AF1,AG1,AH1,AI1,AJ1,AK1,AL1,AM1,AN1,AO1,AP1,AQ1,AR1,AS1,AT1,AU1,AV1,AW1,AX1,AY1,AZ1,BA1,BB1").Select
        dayFound = False
    Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Day Then
        dayFound = True
Exit Do
    End If
        ActiveCell.Offset(0, 1).Select
Loop
    If dayFound = True Then
        dayAddress = ActiveCell.Column
    Else
        MsgBox "Day not found"
    End If
        Cells(nameAddress, dayAddress).Select
        ActiveCell = DTPicker1.value
'
    Name = TextBox5.value
    Day = TextBox19.value
    Range("A6").Select
    nameFound = False
Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Name Then
        nameFound = True
Exit Do
    End If
        ActiveCell.Offset(1, 0).Select
Loop
    If nameFound = True Then
        nameAddress = ActiveCell.Row
    Else
        MsgBox "Name not found"
    End If
        Range("F1,G1,H1,I1,J1,K1,M1,N1,O1,P1,Q1,R1,S1,T1,U1,V1,W1,X1,Y1,Z1,AA1,AB1,AC1,AD1,AE1,AF1,AG1,AH1,AI1,AJ1,AK1,AL1,AM1,AN1,AO1,AP1,AQ1,AR1,AS1,AT1,AU1,AV1,AW1,AX1,AY1,AZ1,BA1,BB1").Select
        dayFound = False
    Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Day Then
        dayFound = True
Exit Do
    End If
        ActiveCell.Offset(0, 1).Select
Loop
    If dayFound = True Then
        dayAddress = ActiveCell.Column
    Else
        MsgBox "Day not found"
    End If
        Cells(nameAddress, dayAddress).Select
        ActiveCell = DTPicker1.value
'
    Name = TextBox5.value
    Day = TextBox11.value
    Range("A6").Select
    nameFound = False
Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Name Then
        nameFound = True
Exit Do
    End If
        ActiveCell.Offset(1, 0).Select
Loop
    If nameFound = True Then
        nameAddress = ActiveCell.Row
    Else
        MsgBox "Name not found"
    End If
        Range("F1,G1,H1,I1,J1,K1,M1,N1,O1,P1,Q1,R1,S1,T1,U1,V1,W1,X1,Y1,Z1,AA1,AB1,AC1,AD1,AE1,AF1,AG1,AH1,AI1,AJ1,AK1,AL1,AM1,AN1,AO1,AP1,AQ1,AR1,AS1,AT1,AU1,AV1,AW1,AX1,AY1,AZ1,BA1,BB1").Select
        dayFound = False
    Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Day Then
        dayFound = True
Exit Do
    End If
        ActiveCell.Offset(0, 1).Select
Loop
    If dayFound = True Then
        dayAddress = ActiveCell.Column
    Else
        MsgBox "Day not found"
    End If
        Cells(nameAddress, dayAddress).Select
        ActiveCell = DTPicker1.value
'
    Name = TextBox4.value
    Day = TextBox12.value
    Range("A6").Select
    nameFound = False
Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Name Then
        nameFound = True
Exit Do
    End If
        ActiveCell.Offset(1, 0).Select
Loop
    If nameFound = True Then
        nameAddress = ActiveCell.Row
    Else
        MsgBox "Name not found"
    End If
        Range("F1,G1,H1,I1,J1,K1,M1,N1,O1,P1,Q1,R1,S1,T1,U1,V1,W1,X1,Y1,Z1,AA1,AB1,AC1,AD1,AE1,AF1,AG1,AH1,AI1,AJ1,AK1,AL1,AM1,AN1,AO1,AP1,AQ1,AR1,AS1,AT1,AU1,AV1,AW1,AX1,AY1,AZ1,BA1,BB1").Select
        dayFound = False
    Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Day Then
        dayFound = True
Exit Do
    End If
        ActiveCell.Offset(0, 1).Select
Loop
    If dayFound = True Then
        dayAddress = ActiveCell.Column
    Else
        MsgBox "Day not found"
    End If
        Cells(nameAddress, dayAddress).Select
        ActiveCell = DTPicker1.value
'
    Name = TextBox4.value
    Day = TextBox13.value
    Range("A6").Select
    nameFound = False
Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Name Then
        nameFound = True
Exit Do
    End If
        ActiveCell.Offset(1, 0).Select
Loop
    If nameFound = True Then
        nameAddress = ActiveCell.Row
    Else
        MsgBox "Name not found"
    End If
        Range("F1,G1,H1,I1,J1,K1,M1,N1,O1,P1,Q1,R1,S1,T1,U1,V1,W1,X1,Y1,Z1,AA1,AB1,AC1,AD1,AE1,AF1,AG1,AH1,AI1,AJ1,AK1,AL1,AM1,AN1,AO1,AP1,AQ1,AR1,AS1,AT1,AU1,AV1,AW1,AX1,AY1,AZ1,BA1,BB1").Select
        dayFound = False
    Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Day Then
        dayFound = True
Exit Do
    End If
        ActiveCell.Offset(0, 1).Select
Loop
    If dayFound = True Then
        dayAddress = ActiveCell.Column
    Else
        MsgBox "Day not found"
    End If
        Cells(nameAddress, dayAddress).Select
        ActiveCell = DTPicker1.value
'
    Name = TextBox4.value
    Day = TextBox17.value
    Range("A6").Select
    nameFound = False
Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Name Then
        nameFound = True
Exit Do
    End If
        ActiveCell.Offset(1, 0).Select
Loop
    If nameFound = True Then
        nameAddress = ActiveCell.Row
    Else
        MsgBox "Name not found"
    End If
        Range("F1,G1,H1,I1,J1,K1,M1,N1,O1,P1,Q1,R1,S1,T1,U1,V1,W1,X1,Y1,Z1,AA1,AB1,AC1,AD1,AE1,AF1,AG1,AH1,AI1,AJ1,AK1,AL1,AM1,AN1,AO1,AP1,AQ1,AR1,AS1,AT1,AU1,AV1,AW1,AX1,AY1,AZ1,BA1,BB1").Select
        dayFound = False
    Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Day Then
        dayFound = True
Exit Do
    End If
        ActiveCell.Offset(0, 1).Select
Loop
    If dayFound = True Then
        dayAddress = ActiveCell.Column
    Else
        MsgBox "Day not found"
    End If
        Cells(nameAddress, dayAddress).Select
        ActiveCell = DTPicker1.value
'
    Name = TextBox4.value
    Day = TextBox16.value
    Range("A6").Select
    nameFound = False
Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Name Then
        nameFound = True
Exit Do
    End If
        ActiveCell.Offset(1, 0).Select
Loop
    If nameFound = True Then
        nameAddress = ActiveCell.Row
    Else
        MsgBox "Name not found"
    End If
        Range("F1,G1,H1,I1,J1,K1,M1,N1,O1,P1,Q1,R1,S1,T1,U1,V1,W1,X1,Y1,Z1,AA1,AB1,AC1,AD1,AE1,AF1,AG1,AH1,AI1,AJ1,AK1,AL1,AM1,AN1,AO1,AP1,AQ1,AR1,AS1,AT1,AU1,AV1,AW1,AX1,AY1,AZ1,BA1,BB1").Select
        dayFound = False
    Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Day Then
        dayFound = True
Exit Do
    End If
        ActiveCell.Offset(0, 1).Select
Loop
    If dayFound = True Then
        dayAddress = ActiveCell.Column
    Else
        MsgBox "Day not found"
    End If
        Cells(nameAddress, dayAddress).Select
        ActiveCell = DTPicker1.value
'
    Name = TextBox4.value
    Day = TextBox15.value
    Range("A6").Select
    nameFound = False
Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Name Then
        nameFound = True
Exit Do
    End If
        ActiveCell.Offset(1, 0).Select
Loop
    If nameFound = True Then
        nameAddress = ActiveCell.Row
    Else
        MsgBox "Name not found"
    End If
        Range("F1,G1,H1,I1,J1,K1,M1,N1,O1,P1,Q1,R1,S1,T1,U1,V1,W1,X1,Y1,Z1,AA1,AB1,AC1,AD1,AE1,AF1,AG1,AH1,AI1,AJ1,AK1,AL1,AM1,AN1,AO1,AP1,AQ1,AR1,AS1,AT1,AU1,AV1,AW1,AX1,AY1,AZ1,BA1,BB1").Select
        dayFound = False
    Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Day Then
        dayFound = True
Exit Do
    End If
        ActiveCell.Offset(0, 1).Select
Loop
    If dayFound = True Then
        dayAddress = ActiveCell.Column
    Else
        MsgBox "Day not found"
    End If
        Cells(nameAddress, dayAddress).Select
        ActiveCell = DTPicker1.value
'
    Name = TextBox4.value
    Day = TextBox14.value
    Range("A6").Select
    nameFound = False
Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Name Then
        nameFound = True
Exit Do
    End If
        ActiveCell.Offset(1, 0).Select
Loop
    If nameFound = True Then
        nameAddress = ActiveCell.Row
    Else
        MsgBox "Name not found"
    End If
        Range("F1,G1,H1,I1,J1,K1,M1,N1,O1,P1,Q1,R1,S1,T1,U1,V1,W1,X1,Y1,Z1,AA1,AB1,AC1,AD1,AE1,AF1,AG1,AH1,AI1,AJ1,AK1,AL1,AM1,AN1,AO1,AP1,AQ1,AR1,AS1,AT1,AU1,AV1,AW1,AX1,AY1,AZ1,BA1,BB1").Select
        dayFound = False
    Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Day Then
        dayFound = True
Exit Do
    End If
        ActiveCell.Offset(0, 1).Select
Loop
    If dayFound = True Then
        dayAddress = ActiveCell.Column
    Else
        MsgBox "Day not found"
    End If
        Cells(nameAddress, dayAddress).Select
        ActiveCell = DTPicker1.value
'
    Name = TextBox4.value
    Day = TextBox18.value
    Range("A6").Select
    nameFound = False
Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Name Then
        nameFound = True
Exit Do
    End If
        ActiveCell.Offset(1, 0).Select
Loop
    If nameFound = True Then
        nameAddress = ActiveCell.Row
    Else
        MsgBox "Name not found"
    End If
        Range("F1,G1,H1,I1,J1,K1,M1,N1,O1,P1,Q1,R1,S1,T1,U1,V1,W1,X1,Y1,Z1,AA1,AB1,AC1,AD1,AE1,AF1,AG1,AH1,AI1,AJ1,AK1,AL1,AM1,AN1,AO1,AP1,AQ1,AR1,AS1,AT1,AU1,AV1,AW1,AX1,AY1,AZ1,BA1,BB1").Select
        dayFound = False
    Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Day Then
        dayFound = True
Exit Do
    End If
        ActiveCell.Offset(0, 1).Select
Loop
    If dayFound = True Then
        dayAddress = ActiveCell.Column
    Else
        MsgBox "Day not found"
    End If
        Cells(nameAddress, dayAddress).Select
        ActiveCell = DTPicker1.value
'
    Name = TextBox4.value
    Day = TextBox19.value
    Range("A6").Select
    nameFound = False
Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Name Then
        nameFound = True
Exit Do
    End If
        ActiveCell.Offset(1, 0).Select
Loop
    If nameFound = True Then
        nameAddress = ActiveCell.Row
    Else
        MsgBox "Name not found"
    End If
        Range("F1,G1,H1,I1,J1,K1,M1,N1,O1,P1,Q1,R1,S1,T1,U1,V1,W1,X1,Y1,Z1,AA1,AB1,AC1,AD1,AE1,AF1,AG1,AH1,AI1,AJ1,AK1,AL1,AM1,AN1,AO1,AP1,AQ1,AR1,AS1,AT1,AU1,AV1,AW1,AX1,AY1,AZ1,BA1,BB1").Select
        dayFound = False
    Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Day Then
        dayFound = True
Exit Do
    End If
        ActiveCell.Offset(0, 1).Select
Loop
    If dayFound = True Then
        dayAddress = ActiveCell.Column
    Else
        MsgBox "Day not found"
    End If
        Cells(nameAddress, dayAddress).Select
        ActiveCell = DTPicker1.value
'
    Name = TextBox4.value
    Day = TextBox11.value
    Range("A6").Select
    nameFound = False
Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Name Then
        nameFound = True
Exit Do
    End If
        ActiveCell.Offset(1, 0).Select
Loop
    If nameFound = True Then
        nameAddress = ActiveCell.Row
    Else
        MsgBox "Name not found"
    End If
        Range("F1,G1,H1,I1,J1,K1,M1,N1,O1,P1,Q1,R1,S1,T1,U1,V1,W1,X1,Y1,Z1,AA1,AB1,AC1,AD1,AE1,AF1,AG1,AH1,AI1,AJ1,AK1,AL1,AM1,AN1,AO1,AP1,AQ1,AR1,AS1,AT1,AU1,AV1,AW1,AX1,AY1,AZ1,BA1,BB1").Select
        dayFound = False
    Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Day Then
        dayFound = True
Exit Do
    End If
        ActiveCell.Offset(0, 1).Select
Loop
    If dayFound = True Then
        dayAddress = ActiveCell.Column
    Else
        MsgBox "Day not found"
    End If
        Cells(nameAddress, dayAddress).Select
        ActiveCell = DTPicker1.value
'
    Name = TextBox8.value
    Day = TextBox12.value
    Range("A6").Select
    nameFound = False
Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Name Then
        nameFound = True
Exit Do
    End If
        ActiveCell.Offset(1, 0).Select
Loop
    If nameFound = True Then
        nameAddress = ActiveCell.Row
    Else
        MsgBox "Name not found"
    End If
        Range("F1,G1,H1,I1,J1,K1,M1,N1,O1,P1,Q1,R1,S1,T1,U1,V1,W1,X1,Y1,Z1,AA1,AB1,AC1,AD1,AE1,AF1,AG1,AH1,AI1,AJ1,AK1,AL1,AM1,AN1,AO1,AP1,AQ1,AR1,AS1,AT1,AU1,AV1,AW1,AX1,AY1,AZ1,BA1,BB1").Select
        dayFound = False
    Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Day Then
        dayFound = True
Exit Do
    End If
        ActiveCell.Offset(0, 1).Select
Loop
    If dayFound = True Then
        dayAddress = ActiveCell.Column
    Else
        MsgBox "Day not found"
    End If
        Cells(nameAddress, dayAddress).Select
        ActiveCell = DTPicker1.value
'
    Name = TextBox8.value
    Day = TextBox13.value
    Range("A6").Select
    nameFound = False
Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Name Then
        nameFound = True
Exit Do
    End If
        ActiveCell.Offset(1, 0).Select
Loop
    If nameFound = True Then
        nameAddress = ActiveCell.Row
    Else
        MsgBox "Name not found"
    End If
        Range("F1,G1,H1,I1,J1,K1,M1,N1,O1,P1,Q1,R1,S1,T1,U1,V1,W1,X1,Y1,Z1,AA1,AB1,AC1,AD1,AE1,AF1,AG1,AH1,AI1,AJ1,AK1,AL1,AM1,AN1,AO1,AP1,AQ1,AR1,AS1,AT1,AU1,AV1,AW1,AX1,AY1,AZ1,BA1,BB1").Select
        dayFound = False
    Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Day Then
        dayFound = True
Exit Do
    End If
        ActiveCell.Offset(0, 1).Select
Loop
    If dayFound = True Then
        dayAddress = ActiveCell.Column
    Else
        MsgBox "Day not found"
    End If
        Cells(nameAddress, dayAddress).Select
        ActiveCell = DTPicker1.value
'
    Name = TextBox8.value
    Day = TextBox17.value
    Range("A6").Select
    nameFound = False
Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Name Then
        nameFound = True
Exit Do
    End If
        ActiveCell.Offset(1, 0).Select
Loop
    If nameFound = True Then
        nameAddress = ActiveCell.Row
    Else
        MsgBox "Name not found"
    End If
        Range("F1,G1,H1,I1,J1,K1,M1,N1,O1,P1,Q1,R1,S1,T1,U1,V1,W1,X1,Y1,Z1,AA1,AB1,AC1,AD1,AE1,AF1,AG1,AH1,AI1,AJ1,AK1,AL1,AM1,AN1,AO1,AP1,AQ1,AR1,AS1,AT1,AU1,AV1,AW1,AX1,AY1,AZ1,BA1,BB1").Select
        dayFound = False
    Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Day Then
        dayFound = True
Exit Do
    End If
        ActiveCell.Offset(0, 1).Select
Loop
    If dayFound = True Then
        dayAddress = ActiveCell.Column
    Else
        MsgBox "Day not found"
    End If
        Cells(nameAddress, dayAddress).Select
        ActiveCell = DTPicker1.value
'
    Name = TextBox8.value
    Day = TextBox16.value
    Range("A6").Select
    nameFound = False
Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Name Then
        nameFound = True
Exit Do
    End If
        ActiveCell.Offset(1, 0).Select
Loop
    If nameFound = True Then
        nameAddress = ActiveCell.Row
    Else
        MsgBox "Name not found"
    End If
        Range("F1,G1,H1,I1,J1,K1,M1,N1,O1,P1,Q1,R1,S1,T1,U1,V1,W1,X1,Y1,Z1,AA1,AB1,AC1,AD1,AE1,AF1,AG1,AH1,AI1,AJ1,AK1,AL1,AM1,AN1,AO1,AP1,AQ1,AR1,AS1,AT1,AU1,AV1,AW1,AX1,AY1,AZ1,BA1,BB1").Select
        dayFound = False
    Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Day Then
        dayFound = True
Exit Do
    End If
        ActiveCell.Offset(0, 1).Select
Loop
    If dayFound = True Then
        dayAddress = ActiveCell.Column
    Else
        MsgBox "Day not found"
    End If
        Cells(nameAddress, dayAddress).Select
        ActiveCell = DTPicker1.value
'
    Name = TextBox8.value
    Day = TextBox15.value
    Range("A6").Select
    nameFound = False
Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Name Then
        nameFound = True
Exit Do
    End If
        ActiveCell.Offset(1, 0).Select
Loop
    If nameFound = True Then
        nameAddress = ActiveCell.Row
    Else
        MsgBox "Name not found"
    End If
        Range("F1,G1,H1,I1,J1,K1,M1,N1,O1,P1,Q1,R1,S1,T1,U1,V1,W1,X1,Y1,Z1,AA1,AB1,AC1,AD1,AE1,AF1,AG1,AH1,AI1,AJ1,AK1,AL1,AM1,AN1,AO1,AP1,AQ1,AR1,AS1,AT1,AU1,AV1,AW1,AX1,AY1,AZ1,BA1,BB1").Select
        dayFound = False
    Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Day Then
        dayFound = True
Exit Do
    End If
        ActiveCell.Offset(0, 1).Select
Loop
    If dayFound = True Then
        dayAddress = ActiveCell.Column
    Else
        MsgBox "Day not found"
    End If
        Cells(nameAddress, dayAddress).Select
        ActiveCell = DTPicker1.value
'
    Name = TextBox8.value
    Day = TextBox14.value
    Range("A6").Select
    nameFound = False
Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Name Then
        nameFound = True
Exit Do
    End If
        ActiveCell.Offset(1, 0).Select
Loop
    If nameFound = True Then
        nameAddress = ActiveCell.Row
    Else
        MsgBox "Name not found"
    End If
        Range("F1,G1,H1,I1,J1,K1,M1,N1,O1,P1,Q1,R1,S1,T1,U1,V1,W1,X1,Y1,Z1,AA1,AB1,AC1,AD1,AE1,AF1,AG1,AH1,AI1,AJ1,AK1,AL1,AM1,AN1,AO1,AP1,AQ1,AR1,AS1,AT1,AU1,AV1,AW1,AX1,AY1,AZ1,BA1,BB1").Select
        dayFound = False
    Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Day Then
        dayFound = True
Exit Do
    End If
        ActiveCell.Offset(0, 1).Select
Loop
    If dayFound = True Then
        dayAddress = ActiveCell.Column
    Else
        MsgBox "Day not found"
    End If
        Cells(nameAddress, dayAddress).Select
        ActiveCell = DTPicker1.value
'
    Name = TextBox8.value
    Day = TextBox18.value
    Range("A6").Select
    nameFound = False
Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Name Then
        nameFound = True
Exit Do
    End If
        ActiveCell.Offset(1, 0).Select
Loop
    If nameFound = True Then
        nameAddress = ActiveCell.Row
    Else
        MsgBox "Name not found"
    End If
        Range("F1,G1,H1,I1,J1,K1,M1,N1,O1,P1,Q1,R1,S1,T1,U1,V1,W1,X1,Y1,Z1,AA1,AB1,AC1,AD1,AE1,AF1,AG1,AH1,AI1,AJ1,AK1,AL1,AM1,AN1,AO1,AP1,AQ1,AR1,AS1,AT1,AU1,AV1,AW1,AX1,AY1,AZ1,BA1,BB1").Select
        dayFound = False
    Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Day Then
        dayFound = True
Exit Do
    End If
        ActiveCell.Offset(0, 1).Select
Loop
    If dayFound = True Then
        dayAddress = ActiveCell.Column
    Else
        MsgBox "Day not found"
    End If
        Cells(nameAddress, dayAddress).Select
        ActiveCell = DTPicker1.value
'
    Name = TextBox8.value
    Day = TextBox19.value
    Range("A6").Select
    nameFound = False
Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Name Then
        nameFound = True
Exit Do
    End If
        ActiveCell.Offset(1, 0).Select
Loop
    If nameFound = True Then
        nameAddress = ActiveCell.Row
    Else
        MsgBox "Name not found"
    End If
        Range("F1,G1,H1,I1,J1,K1,M1,N1,O1,P1,Q1,R1,S1,T1,U1,V1,W1,X1,Y1,Z1,AA1,AB1,AC1,AD1,AE1,AF1,AG1,AH1,AI1,AJ1,AK1,AL1,AM1,AN1,AO1,AP1,AQ1,AR1,AS1,AT1,AU1,AV1,AW1,AX1,AY1,AZ1,BA1,BB1").Select
        dayFound = False
    Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Day Then
        dayFound = True
Exit Do
    End If
        ActiveCell.Offset(0, 1).Select
Loop
    If dayFound = True Then
        dayAddress = ActiveCell.Column
    Else
        MsgBox "Day not found"
    End If
        Cells(nameAddress, dayAddress).Select
        ActiveCell = DTPicker1.value
'
    Name = TextBox8.value
    Day = TextBox11.value
    Range("A6").Select
    nameFound = False
Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Name Then
        nameFound = True
Exit Do
    End If
        ActiveCell.Offset(1, 0).Select
Loop
    If nameFound = True Then
        nameAddress = ActiveCell.Row
    Else
        MsgBox "Name not found"
    End If
        Range("F1,G1,H1,I1,J1,K1,M1,N1,O1,P1,Q1,R1,S1,T1,U1,V1,W1,X1,Y1,Z1,AA1,AB1,AC1,AD1,AE1,AF1,AG1,AH1,AI1,AJ1,AK1,AL1,AM1,AN1,AO1,AP1,AQ1,AR1,AS1,AT1,AU1,AV1,AW1,AX1,AY1,AZ1,BA1,BB1").Select
        dayFound = False
    Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Day Then
        dayFound = True
Exit Do
    End If
        ActiveCell.Offset(0, 1).Select
Loop
    If dayFound = True Then
        dayAddress = ActiveCell.Column
    Else
        MsgBox "Day not found"
    End If
        Cells(nameAddress, dayAddress).Select
        ActiveCell = DTPicker1.value
'
    Name = TextBox9.value
    Day = TextBox12.value
    Range("A6").Select
    nameFound = False
Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Name Then
        nameFound = True
Exit Do
    End If
        ActiveCell.Offset(1, 0).Select
Loop
    If nameFound = True Then
        nameAddress = ActiveCell.Row
    Else
        MsgBox "Name not found"
    End If
        Range("F1,G1,H1,I1,J1,K1,M1,N1,O1,P1,Q1,R1,S1,T1,U1,V1,W1,X1,Y1,Z1,AA1,AB1,AC1,AD1,AE1,AF1,AG1,AH1,AI1,AJ1,AK1,AL1,AM1,AN1,AO1,AP1,AQ1,AR1,AS1,AT1,AU1,AV1,AW1,AX1,AY1,AZ1,BA1,BB1").Select
        dayFound = False
    Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Day Then
        dayFound = True
Exit Do
    End If
        ActiveCell.Offset(0, 1).Select
Loop
    If dayFound = True Then
        dayAddress = ActiveCell.Column
    Else
        MsgBox "Day not found"
    End If
        Cells(nameAddress, dayAddress).Select
        ActiveCell = DTPicker1.value
'
    Name = TextBox9.value
    Day = TextBox13.value
    Range("A6").Select
    nameFound = False
Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Name Then
        nameFound = True
Exit Do
    End If
        ActiveCell.Offset(1, 0).Select
Loop
    If nameFound = True Then
        nameAddress = ActiveCell.Row
    Else
        MsgBox "Name not found"
    End If
        Range("F1,G1,H1,I1,J1,K1,M1,N1,O1,P1,Q1,R1,S1,T1,U1,V1,W1,X1,Y1,Z1,AA1,AB1,AC1,AD1,AE1,AF1,AG1,AH1,AI1,AJ1,AK1,AL1,AM1,AN1,AO1,AP1,AQ1,AR1,AS1,AT1,AU1,AV1,AW1,AX1,AY1,AZ1,BA1,BB1").Select
        dayFound = False
    Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Day Then
        dayFound = True
Exit Do
    End If
        ActiveCell.Offset(0, 1).Select
Loop
    If dayFound = True Then
        dayAddress = ActiveCell.Column
    Else
        MsgBox "Day not found"
    End If
        Cells(nameAddress, dayAddress).Select
        ActiveCell = DTPicker1.value
'
    Name = TextBox9.value
    Day = TextBox17.value
    Range("A6").Select
    nameFound = False
Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Name Then
        nameFound = True
Exit Do
    End If
        ActiveCell.Offset(1, 0).Select
Loop
    If nameFound = True Then
        nameAddress = ActiveCell.Row
    Else
        MsgBox "Name not found"
    End If
        Range("F1,G1,H1,I1,J1,K1,M1,N1,O1,P1,Q1,R1,S1,T1,U1,V1,W1,X1,Y1,Z1,AA1,AB1,AC1,AD1,AE1,AF1,AG1,AH1,AI1,AJ1,AK1,AL1,AM1,AN1,AO1,AP1,AQ1,AR1,AS1,AT1,AU1,AV1,AW1,AX1,AY1,AZ1,BA1,BB1").Select
        dayFound = False
    Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Day Then
        dayFound = True
Exit Do
    End If
        ActiveCell.Offset(0, 1).Select
Loop
    If dayFound = True Then
        dayAddress = ActiveCell.Column
    Else
        MsgBox "Day not found"
    End If
        Cells(nameAddress, dayAddress).Select
        ActiveCell = DTPicker1.value
'
    Name = TextBox9.value
    Day = TextBox16.value
    Range("A6").Select
    nameFound = False
Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Name Then
        nameFound = True
Exit Do
    End If
        ActiveCell.Offset(1, 0).Select
Loop
    If nameFound = True Then
        nameAddress = ActiveCell.Row
    Else
        MsgBox "Name not found"
    End If
        Range("F1,G1,H1,I1,J1,K1,M1,N1,O1,P1,Q1,R1,S1,T1,U1,V1,W1,X1,Y1,Z1,AA1,AB1,AC1,AD1,AE1,AF1,AG1,AH1,AI1,AJ1,AK1,AL1,AM1,AN1,AO1,AP1,AQ1,AR1,AS1,AT1,AU1,AV1,AW1,AX1,AY1,AZ1,BA1,BB1").Select
        dayFound = False
    Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Day Then
        dayFound = True
Exit Do
    End If
        ActiveCell.Offset(0, 1).Select
Loop
    If dayFound = True Then
        dayAddress = ActiveCell.Column
    Else
        MsgBox "Day not found"
    End If
        Cells(nameAddress, dayAddress).Select
        ActiveCell = DTPicker1.value
'
    Name = TextBox9.value
    Day = TextBox15.value
    Range("A6").Select
    nameFound = False
Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Name Then
        nameFound = True
Exit Do
    End If
        ActiveCell.Offset(1, 0).Select
Loop
    If nameFound = True Then
        nameAddress = ActiveCell.Row
    Else
        MsgBox "Name not found"
    End If
        Range("F1,G1,H1,I1,J1,K1,M1,N1,O1,P1,Q1,R1,S1,T1,U1,V1,W1,X1,Y1,Z1,AA1,AB1,AC1,AD1,AE1,AF1,AG1,AH1,AI1,AJ1,AK1,AL1,AM1,AN1,AO1,AP1,AQ1,AR1,AS1,AT1,AU1,AV1,AW1,AX1,AY1,AZ1,BA1,BB1").Select
        dayFound = False
    Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Day Then
        dayFound = True
Exit Do
    End If
        ActiveCell.Offset(0, 1).Select
Loop
    If dayFound = True Then
        dayAddress = ActiveCell.Column
    Else
        MsgBox "Day not found"
    End If
        Cells(nameAddress, dayAddress).Select
        ActiveCell = DTPicker1.value
'
    Name = TextBox9.value
    Day = TextBox14.value
    Range("A6").Select
    nameFound = False
Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Name Then
        nameFound = True
Exit Do
    End If
        ActiveCell.Offset(1, 0).Select
Loop
    If nameFound = True Then
        nameAddress = ActiveCell.Row
    Else
        MsgBox "Name not found"
    End If
        Range("F1,G1,H1,I1,J1,K1,M1,N1,O1,P1,Q1,R1,S1,T1,U1,V1,W1,X1,Y1,Z1,AA1,AB1,AC1,AD1,AE1,AF1,AG1,AH1,AI1,AJ1,AK1,AL1,AM1,AN1,AO1,AP1,AQ1,AR1,AS1,AT1,AU1,AV1,AW1,AX1,AY1,AZ1,BA1,BB1").Select
        dayFound = False
    Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Day Then
        dayFound = True
Exit Do
    End If
        ActiveCell.Offset(0, 1).Select
Loop
    If dayFound = True Then
        dayAddress = ActiveCell.Column
    Else
        MsgBox "Day not found"
    End If
        Cells(nameAddress, dayAddress).Select
        ActiveCell = DTPicker1.value
'
    Name = TextBox9.value
    Day = TextBox18.value
    Range("A6").Select
    nameFound = False
Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Name Then
        nameFound = True
Exit Do
    End If
        ActiveCell.Offset(1, 0).Select
Loop
    If nameFound = True Then
        nameAddress = ActiveCell.Row
    Else
        MsgBox "Name not found"
    End If
        Range("F1,G1,H1,I1,J1,K1,M1,N1,O1,P1,Q1,R1,S1,T1,U1,V1,W1,X1,Y1,Z1,AA1,AB1,AC1,AD1,AE1,AF1,AG1,AH1,AI1,AJ1,AK1,AL1,AM1,AN1,AO1,AP1,AQ1,AR1,AS1,AT1,AU1,AV1,AW1,AX1,AY1,AZ1,BA1,BB1").Select
        dayFound = False
    Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Day Then
        dayFound = True
Exit Do
    End If
        ActiveCell.Offset(0, 1).Select
Loop
    If dayFound = True Then
        dayAddress = ActiveCell.Column
    Else
        MsgBox "Day not found"
    End If
        Cells(nameAddress, dayAddress).Select
        ActiveCell = DTPicker1.value
'
    Name = TextBox9.value
    Day = TextBox19.value
    Range("A6").Select
    nameFound = False
Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Name Then
        nameFound = True
Exit Do
    End If
        ActiveCell.Offset(1, 0).Select
Loop
    If nameFound = True Then
        nameAddress = ActiveCell.Row
    Else
        MsgBox "Name not found"
    End If
        Range("F1,G1,H1,I1,J1,K1,M1,N1,O1,P1,Q1,R1,S1,T1,U1,V1,W1,X1,Y1,Z1,AA1,AB1,AC1,AD1,AE1,AF1,AG1,AH1,AI1,AJ1,AK1,AL1,AM1,AN1,AO1,AP1,AQ1,AR1,AS1,AT1,AU1,AV1,AW1,AX1,AY1,AZ1,BA1,BB1").Select
        dayFound = False
    Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Day Then
        dayFound = True
Exit Do
    End If
        ActiveCell.Offset(0, 1).Select
Loop
    If dayFound = True Then
        dayAddress = ActiveCell.Column
    Else
        MsgBox "Day not found"
    End If
        Cells(nameAddress, dayAddress).Select
        ActiveCell = DTPicker1.value
'
    Name = TextBox9.value
    Day = TextBox11.value
    Range("A6").Select
    nameFound = False
Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Name Then
        nameFound = True
Exit Do
    End If
        ActiveCell.Offset(1, 0).Select
Loop
    If nameFound = True Then
        nameAddress = ActiveCell.Row
    Else
        MsgBox "Name not found"
    End If
        Range("F1,G1,H1,I1,J1,K1,M1,N1,O1,P1,Q1,R1,S1,T1,U1,V1,W1,X1,Y1,Z1,AA1,AB1,AC1,AD1,AE1,AF1,AG1,AH1,AI1,AJ1,AK1,AL1,AM1,AN1,AO1,AP1,AQ1,AR1,AS1,AT1,AU1,AV1,AW1,AX1,AY1,AZ1,BA1,BB1").Select
        dayFound = False
    Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Day Then
        dayFound = True
Exit Do
    End If
        ActiveCell.Offset(0, 1).Select
Loop
    If dayFound = True Then
        dayAddress = ActiveCell.Column
    Else
        MsgBox "Day not found"
    End If
        Cells(nameAddress, dayAddress).Select
        ActiveCell = DTPicker1.value
'
    Name = TextBox10.value
    Day = TextBox12.value
    Range("A6").Select
    nameFound = False
Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Name Then
        nameFound = True
Exit Do
    End If
        ActiveCell.Offset(1, 0).Select
Loop
    If nameFound = True Then
        nameAddress = ActiveCell.Row
    Else
        MsgBox "Name not found"
    End If
        Range("F1,G1,H1,I1,J1,K1,M1,N1,O1,P1,Q1,R1,S1,T1,U1,V1,W1,X1,Y1,Z1,AA1,AB1,AC1,AD1,AE1,AF1,AG1,AH1,AI1,AJ1,AK1,AL1,AM1,AN1,AO1,AP1,AQ1,AR1,AS1,AT1,AU1,AV1,AW1,AX1,AY1,AZ1,BA1,BB1").Select
        dayFound = False
    Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Day Then
        dayFound = True
Exit Do
    End If
        ActiveCell.Offset(0, 1).Select
Loop
    If dayFound = True Then
        dayAddress = ActiveCell.Column
    Else
        MsgBox "Day not found"
    End If
        Cells(nameAddress, dayAddress).Select
        ActiveCell = DTPicker1.value
'
    Name = TextBox10.value
    Day = TextBox13.value
    Range("A6").Select
    nameFound = False
Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Name Then
        nameFound = True
Exit Do
    End If
        ActiveCell.Offset(1, 0).Select
Loop
    If nameFound = True Then
        nameAddress = ActiveCell.Row
    Else
        MsgBox "Name not found"
    End If
        Range("F1,G1,H1,I1,J1,K1,M1,N1,O1,P1,Q1,R1,S1,T1,U1,V1,W1,X1,Y1,Z1,AA1,AB1,AC1,AD1,AE1,AF1,AG1,AH1,AI1,AJ1,AK1,AL1,AM1,AN1,AO1,AP1,AQ1,AR1,AS1,AT1,AU1,AV1,AW1,AX1,AY1,AZ1,BA1,BB1").Select
        dayFound = False
    Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Day Then
        dayFound = True
Exit Do
    End If
        ActiveCell.Offset(0, 1).Select
Loop
    If dayFound = True Then
        dayAddress = ActiveCell.Column
    Else
        MsgBox "Day not found"
    End If
        Cells(nameAddress, dayAddress).Select
        ActiveCell = DTPicker1.value
'
    Name = TextBox10.value
    Day = TextBox17.value
    Range("A6").Select
    nameFound = False
Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Name Then
        nameFound = True
Exit Do
    End If
        ActiveCell.Offset(1, 0).Select
Loop
    If nameFound = True Then
        nameAddress = ActiveCell.Row
    Else
        MsgBox "Name not found"
    End If
        Range("F1,G1,H1,I1,J1,K1,M1,N1,O1,P1,Q1,R1,S1,T1,U1,V1,W1,X1,Y1,Z1,AA1,AB1,AC1,AD1,AE1,AF1,AG1,AH1,AI1,AJ1,AK1,AL1,AM1,AN1,AO1,AP1,AQ1,AR1,AS1,AT1,AU1,AV1,AW1,AX1,AY1,AZ1,BA1,BB1").Select
        dayFound = False
    Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Day Then
        dayFound = True
Exit Do
    End If
        ActiveCell.Offset(0, 1).Select
Loop
    If dayFound = True Then
        dayAddress = ActiveCell.Column
    Else
        MsgBox "Day not found"
    End If
        Cells(nameAddress, dayAddress).Select
        ActiveCell = DTPicker1.value
'
    Name = TextBox10.value
    Day = TextBox16.value
    Range("A6").Select
    nameFound = False
Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Name Then
        nameFound = True
Exit Do
    End If
        ActiveCell.Offset(1, 0).Select
Loop
    If nameFound = True Then
        nameAddress = ActiveCell.Row
    Else
        MsgBox "Name not found"
    End If
        Range("F1,G1,H1,I1,J1,K1,M1,N1,O1,P1,Q1,R1,S1,T1,U1,V1,W1,X1,Y1,Z1,AA1,AB1,AC1,AD1,AE1,AF1,AG1,AH1,AI1,AJ1,AK1,AL1,AM1,AN1,AO1,AP1,AQ1,AR1,AS1,AT1,AU1,AV1,AW1,AX1,AY1,AZ1,BA1,BB1").Select
        dayFound = False
    Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Day Then
        dayFound = True
Exit Do
    End If
        ActiveCell.Offset(0, 1).Select
Loop
    If dayFound = True Then
        dayAddress = ActiveCell.Column
    Else
        MsgBox "Day not found"
    End If
        Cells(nameAddress, dayAddress).Select
        ActiveCell = DTPicker1.value
'
    Name = TextBox10.value
    Day = TextBox15.value
    Range("A6").Select
    nameFound = False
Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Name Then
        nameFound = True
Exit Do
    End If
        ActiveCell.Offset(1, 0).Select
Loop
    If nameFound = True Then
        nameAddress = ActiveCell.Row
    Else
        MsgBox "Name not found"
    End If
        Range("F1,G1,H1,I1,J1,K1,M1,N1,O1,P1,Q1,R1,S1,T1,U1,V1,W1,X1,Y1,Z1,AA1,AB1,AC1,AD1,AE1,AF1,AG1,AH1,AI1,AJ1,AK1,AL1,AM1,AN1,AO1,AP1,AQ1,AR1,AS1,AT1,AU1,AV1,AW1,AX1,AY1,AZ1,BA1,BB1").Select
        dayFound = False
    Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Day Then
        dayFound = True
Exit Do
    End If
        ActiveCell.Offset(0, 1).Select
Loop
    If dayFound = True Then
        dayAddress = ActiveCell.Column
    Else
        MsgBox "Day not found"
    End If
        Cells(nameAddress, dayAddress).Select
        ActiveCell = DTPicker1.value
'
    Name = TextBox10.value
    Day = TextBox14.value
    Range("A6").Select
    nameFound = False
Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Name Then
        nameFound = True
Exit Do
    End If
        ActiveCell.Offset(1, 0).Select
Loop
    If nameFound = True Then
        nameAddress = ActiveCell.Row
    Else
        MsgBox "Name not found"
    End If
        Range("F1,G1,H1,I1,J1,K1,M1,N1,O1,P1,Q1,R1,S1,T1,U1,V1,W1,X1,Y1,Z1,AA1,AB1,AC1,AD1,AE1,AF1,AG1,AH1,AI1,AJ1,AK1,AL1,AM1,AN1,AO1,AP1,AQ1,AR1,AS1,AT1,AU1,AV1,AW1,AX1,AY1,AZ1,BA1,BB1").Select
        dayFound = False
    Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Day Then
        dayFound = True
Exit Do
    End If
        ActiveCell.Offset(0, 1).Select
Loop
    If dayFound = True Then
        dayAddress = ActiveCell.Column
    Else
        MsgBox "Day not found"
    End If
        Cells(nameAddress, dayAddress).Select
        ActiveCell = DTPicker1.value
'
    Name = TextBox10.value
    Day = TextBox18.value
    Range("A6").Select
    nameFound = False
Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Name Then
        nameFound = True
Exit Do
    End If
        ActiveCell.Offset(1, 0).Select
Loop
    If nameFound = True Then
        nameAddress = ActiveCell.Row
    Else
        MsgBox "Name not found"
    End If
        Range("F1,G1,H1,I1,J1,K1,M1,N1,O1,P1,Q1,R1,S1,T1,U1,V1,W1,X1,Y1,Z1,AA1,AB1,AC1,AD1,AE1,AF1,AG1,AH1,AI1,AJ1,AK1,AL1,AM1,AN1,AO1,AP1,AQ1,AR1,AS1,AT1,AU1,AV1,AW1,AX1,AY1,AZ1,BA1,BB1").Select
        dayFound = False
    Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Day Then
        dayFound = True
Exit Do
    End If
        ActiveCell.Offset(0, 1).Select
Loop
    If dayFound = True Then
        dayAddress = ActiveCell.Column
    Else
        MsgBox "Day not found"
    End If
        Cells(nameAddress, dayAddress).Select
        ActiveCell = DTPicker1.value
'
    Name = TextBox10.value
    Day = TextBox19.value
    Range("A6").Select
    nameFound = False
Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Name Then
        nameFound = True
Exit Do
    End If
        ActiveCell.Offset(1, 0).Select
Loop
    If nameFound = True Then
        nameAddress = ActiveCell.Row
    Else
        MsgBox "Name not found"
    End If
        Range("F1,G1,H1,I1,J1,K1,M1,N1,O1,P1,Q1,R1,S1,T1,U1,V1,W1,X1,Y1,Z1,AA1,AB1,AC1,AD1,AE1,AF1,AG1,AH1,AI1,AJ1,AK1,AL1,AM1,AN1,AO1,AP1,AQ1,AR1,AS1,AT1,AU1,AV1,AW1,AX1,AY1,AZ1,BA1,BB1").Select
        dayFound = False
    Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Day Then
        dayFound = True
Exit Do
    End If
        ActiveCell.Offset(0, 1).Select
Loop
    If dayFound = True Then
        dayAddress = ActiveCell.Column
    Else
        MsgBox "Day not found"
    End If
        Cells(nameAddress, dayAddress).Select
        ActiveCell = DTPicker1.value
'
    Name = TextBox10.value
    Day = TextBox11.value
    Range("A6").Select
    nameFound = False
Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Name Then
        nameFound = True
Exit Do
    End If
        ActiveCell.Offset(1, 0).Select
Loop
    If nameFound = True Then
        nameAddress = ActiveCell.Row
    Else
        MsgBox "Name not found"
    End If
        Range("F1,G1,H1,I1,J1,K1,M1,N1,O1,P1,Q1,R1,S1,T1,U1,V1,W1,X1,Y1,Z1,AA1,AB1,AC1,AD1,AE1,AF1,AG1,AH1,AI1,AJ1,AK1,AL1,AM1,AN1,AO1,AP1,AQ1,AR1,AS1,AT1,AU1,AV1,AW1,AX1,AY1,AZ1,BA1,BB1").Select
        dayFound = False
    Do Until IsEmpty(ActiveCell)
    If ActiveCell.value = Day Then
        dayFound = True
Exit Do
    End If
        ActiveCell.Offset(0, 1).Select
Loop
    If dayFound = True Then
        dayAddress = ActiveCell.Column
    Else
        MsgBox "Day not found"
    End If
        Cells(nameAddress, dayAddress).Select
        ActiveCell = DTPicker1.value
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
You could start by not repeating code like this.
VBA Code:
Name = Textbox2.Value
I know Textbox2 changes throughout the code but you only need to set the value of Name once in each 'section' of the code.

Also, instead of this to try and find the name,
VBA Code:
  nameFound = False
    Do Until IsEmpty(ActiveCell)
        If ActiveCell.Value = Name Then
            nameFound = True
            Exit Do
        End If
        ActiveCell.Offset(1, 0).Select
    Loop
    If nameFound = True Then
        nameAddress = ActiveCell.Row
    Else
        MsgBox "Name not found"
    End If
you could use something like this.
VBA Code:
Res = Application.Match(Name, Columns(1), 0)

If Not IsError(Res) Then
    nameAddress = Res
Else
    MsgBox "Name not found"
End if
Also, you probably don't need to repeat that code - it should suffice to have it at the top of each 'section'.

Similar code could be used to find the day column, but using Rows(1) instead of Columns(1).

Another quick fix would be to use something like this,
VBA Code:
    Cells(nameAddress, dayAddress).Value = DTPicker1.Value
instead of this.
VBA Code:
    Cells(nameAddress, dayAddress).Select
    ActiveCell = DTPicker1.Value

Finally, there might be a way to introduce a loop to go through the controls but I'm not sure if there's a clear naming pattern for that.
 
Upvote 0
Ok. I will work through it and let you know how it goes. Will take some time though....:biggrin:
 
Upvote 0
You should be able to do some of it with Find/Replace.:)
 
Upvote 0
Ran in to an issue. If a text box is empty the code stops. Trying to figure out to make it run through code and ignore text boxes that are empty.
 
Upvote 0
Can you post your current code?

Which textboxes do you want to check for being empty?
 
Upvote 0
I fixed it. The code itself was to long. Had to shorten it up. Cleaned up a lot of pointless code.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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