اذهب الي المحتوي
أوفيسنا
بحث مخصص من جوجل فى أوفيسنا
Custom Search

الردود الموصى بها

قام بنشر

اريد اختصار هذا الكود للابتعاد عن مشكلة procedure too large

Sub g1()
lastRow = Sheet2.Cells(Rows.Count, "A").End(xlUp).Row + 1

For s = 1 To lastRow
If UserForm1.TextBox1.Text = Sheet2.Cells(s, 1).Text Then
If Sheet2.Cells(s, 21).Value = "" Then

t = 0

If Sheet2.Cells(s, 10 + t).Value = "A" Then
Sheet2.Cells(s, 10 + t).Value = 4
Else
If Sheet2.Cells(s, 10 + t).Value = "A-" Then
Sheet2.Cells(s, 10 + t).Value = 3.7
Else
If Sheet2.Cells(s, 10 + t).Value = "B+" Then
Sheet2.Cells(s, 10 + t).Value = 3.3
Else
If Sheet2.Cells(s, 10 + t).Value = "B" Then
Sheet2.Cells(s, 10 + t).Value = 3
Else
If Sheet2.Cells(s, 10 + t).Value = "B-" Then
Sheet2.Cells(s, 10 + t).Value = 2.7
Else
If Sheet2.Cells(s, 10 + t).Value = "C+" Then
Sheet2.Cells(s, 10 + t).Value = 2.3
Else
If Sheet2.Cells(s, 10 + t).Value = "C" Then
Sheet2.Cells(s, 10 + t).Value = 2
Else
If Sheet2.Cells(s, 10 + t).Value = "C-" Then
Sheet2.Cells(s, 10 + t).Value = 1.7
Else
If Sheet2.Cells(s, 10 + t).Value = "D" Then
Sheet2.Cells(s, 10 + t).Value = 1.3
Else
If Sheet2.Cells(s, 10 + t).Value = "F" Then
Sheet2.Cells(s, 10 + t).Value = 1
Else
If Sheet2.Cells(s, 10 + t).Value > 92.5 Then
Sheet2.Cells(s, 10 + t).Value = 4
Else
If Sheet2.Cells(s, 10 + t).Value > 82.5 Then
Sheet2.Cells(s, 10 + t).Value = 3.7
Else
If Sheet2.Cells(s, 10 + t).Value > 75 Then
Sheet2.Cells(s, 10 + t).Value = 3.3
Else
If Sheet2.Cells(s, 10 + t).Value > 67.5 Then
Sheet2.Cells(s, 10 + t).Value = 3
Else
If Sheet2.Cells(s, 10 + t).Value > 57.5 Then
Sheet2.Cells(s, 10 + t).Value = 2.7
Else
If Sheet2.Cells(s, 10 + t).Value > 50 Then
Sheet2.Cells(s, 10 + t).Value = 2.3
Else
If Sheet2.Cells(s, 10 + t).Value > 42.5 Then
Sheet2.Cells(s, 10 + t).Value = 2
Else
If Sheet2.Cells(s, 10 + t).Value > 32.5 Then
Sheet2.Cells(s, 10 + t).Value = 1.7
Else
If Sheet2.Cells(s, 10 + t).Value > 25 Then
Sheet2.Cells(s, 10 + t).Value = 1.3
Else
If Sheet2.Cells(s, 10 + t).Value >= 0 Then
Sheet2.Cells(s, 10 + t).Value = 0
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
Next
NextlastRow = Sheet2.Cells(Rows.Count, "A").End(xlUp).Row + 1
For s = 1 To lastRow
If UserForm1.TextBox1.Text = Sheet2.Cells(s, 1).Text Then
If Sheet2.Cells(s, 21).Value = "" Then
t = 0
If Sheet2.Cells(s, 13 + t).Value = "A" Then
Sheet2.Cells(s, 13 + t).Value = 4
Else
If Sheet2.Cells(s, 13 + t).Value = "A-" Then
Sheet2.Cells(s, 13 + t).Value = 3.7
Else
If Sheet2.Cells(s, 13 + t).Value = "B+" Then
Sheet2.Cells(s, 13 + t).Value = 3.3
Else
If Sheet2.Cells(s, 13 + t).Value = "B" Then
Sheet2.Cells(s, 13 + t).Value = 3
Else
If Sheet2.Cells(s, 13 + t).Value = "B-" Then
Sheet2.Cells(s, 13 + t).Value = 2.7
Else
If Sheet2.Cells(s, 13 + t).Value = "C+" Then
Sheet2.Cells(s, 13 + t).Value = 2.3
Else
If Sheet2.Cells(s, 13 + t).Value = "C" Then
Sheet2.Cells(s, 13 + t).Value = 2
Else
If Sheet2.Cells(s, 13 + t).Value = "C-" Then
Sheet2.Cells(s, 13 + t).Value = 1.7
Else
If Sheet2.Cells(s, 13 + t).Value = "D" Then
Sheet2.Cells(s, 13 + t).Value = 1.3
Else
If Sheet2.Cells(s, 13 + t).Value = "F" Then
Sheet2.Cells(s, 13 + t).Value = 0
Else
If Sheet2.Cells(s, 13 + t).Value > 92.5 Then
Sheet2.Cells(s, 13 + t).Value = 4
Else
If Sheet2.Cells(s, 13 + t).Value > 82.5 Then
Sheet2.Cells(s, 13 + t).Value = 3.7
Else
If Sheet2.Cells(s, 13 + t).Value > 75 Then
Sheet2.Cells(s, 13 + t).Value = 3.3
Else
If Sheet2.Cells(s, 13 + t).Value > 67.5 Then
Sheet2.Cells(s, 13 + t).Value = 3
Else
If Sheet2.Cells(s, 13 + t).Value > 57.5 Then
Sheet2.Cells(s, 13 + t).Value = 2.7
Else
If Sheet2.Cells(s, 13 + t).Value > 50 Then
Sheet2.Cells(s, 13 + t).Value = 2.3
Else
If Sheet2.Cells(s, 13 + t).Value > 42.5 Then
Sheet2.Cells(s, 13 + t).Value = 2
Else
If Sheet2.Cells(s, 13 + t).Value > 32.5 Then
Sheet2.Cells(s, 13 + t).Value = 1.7
Else
If Sheet2.Cells(s, 13 + t).Value > 25 Then
Sheet2.Cells(s, 13 + t).Value = 1.3
Else
If Sheet2.Cells(s, 13 + t).Value >= 0 Then
Sheet2.Cells(s, 13 + t).Value = 0
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
Next


lastRow = Sheet2.Cells(Rows.Count, "A").End(xlUp).Row + 1

For s = 1 To lastRow
If UserForm1.TextBox1.Text = Sheet2.Cells(s, 1).Text Then
If Sheet2.Cells(s, 21).Value = "" Then
t = 0
If Sheet2.Cells(s, 16 + t).Value = "A" Then
Sheet2.Cells(s, 16 + t).Value = 4
Else
If Sheet2.Cells(s, 16 + t).Value = "A-" Then
Sheet2.Cells(s, 16 + t).Value = 3.7
Else
If Sheet2.Cells(s, 16 + t).Value = "B+" Then
Sheet2.Cells(s, 16 + t).Value = 3.3
Else
If Sheet2.Cells(s, 16 + t).Value = "B" Then
Sheet2.Cells(s, 16 + t).Value = 3
Else
If Sheet2.Cells(s, 16 + t).Value = "B-" Then
Sheet2.Cells(s, 16 + t).Value = 2.7
Else
If Sheet2.Cells(s, 16 + t).Value = "C+" Then
Sheet2.Cells(s, 16 + t).Value = 2.3
Else
If Sheet2.Cells(s, 16 + t).Value = "C" Then
Sheet2.Cells(s, 16 + t).Value = 2
Else
If Sheet2.Cells(s, 16 + t).Value = "C-" Then
Sheet2.Cells(s, 16 + t).Value = 1.7
Else
If Sheet2.Cells(s, 16 + t).Value = "D" Then
Sheet2.Cells(s, 16 + t).Value = 1.3
Else
If Sheet2.Cells(s, 16 + t).Value = "F" Then
Sheet2.Cells(s, 16 + t).Value = 0
Else
If Sheet2.Cells(s, 16 + t).Value > 92.5 Then
Sheet2.Cells(s, 16 + t).Value = 4
Else
If Sheet2.Cells(s, 16 + t).Value > 82.5 Then
Sheet2.Cells(s, 16 + t).Value = 3.7
Else
If Sheet2.Cells(s, 16 + t).Value > 75 Then
Sheet2.Cells(s, 16 + t).Value = 3.3
Else
If Sheet2.Cells(s, 16 + t).Value > 67.5 Then
Sheet2.Cells(s, 16 + t).Value = 3
Else
If Sheet2.Cells(s, 16 + t).Value > 57.5 Then
Sheet2.Cells(s, 16 + t).Value = 2.7
Else
If Sheet2.Cells(s, 16 + t).Value > 50 Then
Sheet2.Cells(s, 16 + t).Value = 2.3
Else
If Sheet2.Cells(s, 16 + t).Value > 42.5 Then
Sheet2.Cells(s, 16 + t).Value = 2
Else
If Sheet2.Cells(s, 16 + t).Value > 32.5 Then
Sheet2.Cells(s, 16 + t).Value = 1.7
Else
If Sheet2.Cells(s, 16 + t).Value > 25 Then
Sheet2.Cells(s, 16 + t).Value = 1.3
Else
If Sheet2.Cells(s, 16 + t).Value >= 0 Then
Sheet2.Cells(s, 16 + t).Value = 0
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
Next


lastRow = Sheet2.Cells(Rows.Count, "A").End(xlUp).Row + 1

For s = 1 To lastRow
If UserForm1.TextBox1.Text = Sheet2.Cells(s, 1).Text Then
If Sheet2.Cells(s, 35).Value = "" Then

t = 14
If Sheet2.Cells(s, 10 + t).Value = "" Then
Sheet2.Cells(s, 10 + t).Value = ""
Else
If Sheet2.Cells(s, 10 + t).Value = "A" Then
Sheet2.Cells(s, 10 + t).Value = 4
Else
If Sheet2.Cells(s, 10 + t).Value = "A-" Then
Sheet2.Cells(s, 10 + t).Value = 3.7
Else
If Sheet2.Cells(s, 10 + t).Value = "B+" Then
Sheet2.Cells(s, 10 + t).Value = 3.3
Else
If Sheet2.Cells(s, 10 + t).Value = "B" Then
Sheet2.Cells(s, 10 + t).Value = 3
Else
If Sheet2.Cells(s, 10 + t).Value = "B-" Then
Sheet2.Cells(s, 10 + t).Value = 2.7
Else
If Sheet2.Cells(s, 10 + t).Value = "C+" Then
Sheet2.Cells(s, 10 + t).Value = 2.3
Else
If Sheet2.Cells(s, 10 + t).Value = "C" Then
Sheet2.Cells(s, 10 + t).Value = 2
Else
If Sheet2.Cells(s, 10 + t).Value = "C-" Then
Sheet2.Cells(s, 10 + t).Value = 1.7
Else
If Sheet2.Cells(s, 10 + t).Value = "D" Then
Sheet2.Cells(s, 10 + t).Value = 1.3
Else
If Sheet2.Cells(s, 10 + t).Value = "F" Then
Sheet2.Cells(s, 10 + t).Value = 0
Else
If Sheet2.Cells(s, 10 + t).Value > 92.5 Then
Sheet2.Cells(s, 10 + t).Value = 4
Else
If Sheet2.Cells(s, 10 + t).Value > 82.5 Then
Sheet2.Cells(s, 10 + t).Value = 3.7
Else
If Sheet2.Cells(s, 10 + t).Value > 75 Then
Sheet2.Cells(s, 10 + t).Value = 3.3
Else
If Sheet2.Cells(s, 10 + t).Value > 67.5 Then
Sheet2.Cells(s, 10 + t).Value = 3
Else
If Sheet2.Cells(s, 10 + t).Value > 57.5 Then
Sheet2.Cells(s, 10 + t).Value = 2.7
Else
If Sheet2.Cells(s, 10 + t).Value > 50 Then
Sheet2.Cells(s, 10 + t).Value = 2.3
Else
If Sheet2.Cells(s, 10 + t).Value > 42.5 Then
Sheet2.Cells(s, 10 + t).Value = 2
Else
If Sheet2.Cells(s, 10 + t).Value > 32.5 Then
Sheet2.Cells(s, 10 + t).Value = 1.7
Else
If Sheet2.Cells(s, 10 + t).Value > 25 Then
Sheet2.Cells(s, 10 + t).Value = 1.3
Else
If Sheet2.Cells(s, 10 + t).Value >= 0 Then
Sheet2.Cells(s, 10 + t).Value = 0
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
Next

lastRow = Sheet2.Cells(Rows.Count, "A").End(xlUp).Row + 1

For s = 1 To lastRow
If UserForm1.TextBox1.Text = Sheet2.Cells(s, 1).Text Then
If Sheet2.Cells(s, 35).Value = "" Then
t = 14
If Sheet2.Cells(s, 13 + t).Value = "" Then
Sheet2.Cells(s, 13 + t).Value = ""
Else
If Sheet2.Cells(s, 13 + t).Value = "A" Then
Sheet2.Cells(s, 13 + t).Value = 4
Else
If Sheet2.Cells(s, 13 + t).Value = "A-" Then
Sheet2.Cells(s, 13 + t).Value = 3.7
Else
If Sheet2.Cells(s, 13 + t).Value = "B+" Then
Sheet2.Cells(s, 13 + t).Value = 3.3
Else
If Sheet2.Cells(s, 13 + t).Value = "B" Then
Sheet2.Cells(s, 13 + t).Value = 3
Else
If Sheet2.Cells(s, 13 + t).Value = "B-" Then
Sheet2.Cells(s, 13 + t).Value = 2.7
Else
If Sheet2.Cells(s, 13 + t).Value = "C+" Then
Sheet2.Cells(s, 13 + t).Value = 2.3
Else
If Sheet2.Cells(s, 13 + t).Value = "C" Then
Sheet2.Cells(s, 13 + t).Value = 2
Else
If Sheet2.Cells(s, 13 + t).Value = "C-" Then
Sheet2.Cells(s, 13 + t).Value = 1.7
Else
If Sheet2.Cells(s, 13 + t).Value = "D" Then
Sheet2.Cells(s, 13 + t).Value = 1.3
Else
If Sheet2.Cells(s, 13 + t).Value = "F" Then
Sheet2.Cells(s, 13 + t).Value = 0
Else
If Sheet2.Cells(s, 13 + t).Value > 92.5 Then
Sheet2.Cells(s, 13 + t).Value = 4
Else
If Sheet2.Cells(s, 13 + t).Value > 82.5 Then
Sheet2.Cells(s, 13 + t).Value = 3.7
Else
If Sheet2.Cells(s, 13 + t).Value > 75 Then
Sheet2.Cells(s, 13 + t).Value = 3.3
Else
If Sheet2.Cells(s, 13 + t).Value > 67.5 Then
Sheet2.Cells(s, 13 + t).Value = 3
Else
If Sheet2.Cells(s, 13 + t).Value > 57.5 Then
Sheet2.Cells(s, 13 + t).Value = 2.7
Else
If Sheet2.Cells(s, 13 + t).Value > 50 Then
Sheet2.Cells(s, 13 + t).Value = 2.3
Else
If Sheet2.Cells(s, 13 + t).Value > 42.5 Then
Sheet2.Cells(s, 13 + t).Value = 2
Else
If Sheet2.Cells(s, 13 + t).Value > 32.5 Then
Sheet2.Cells(s, 13 + t).Value = 1.7
Else
If Sheet2.Cells(s, 13 + t).Value > 25 Then
Sheet2.Cells(s, 13 + t).Value = 1.3
Else
If Sheet2.Cells(s, 13 + t).Value >= 0 Then
Sheet2.Cells(s, 13 + t).Value = 0
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
Next

lastRow = Sheet2.Cells(Rows.Count, "A").End(xlUp).Row + 1

For s = 1 To lastRow
If UserForm1.TextBox1.Text = Sheet2.Cells(s, 1).Text Then
If Sheet2.Cells(s, 35).Value = "" Then
t = 14
If Sheet2.Cells(s, 16 + t).Value = "" Then
Sheet2.Cells(s, 16 + t).Value = ""
Else
If Sheet2.Cells(s, 16 + t).Value = "A" Then
Sheet2.Cells(s, 16 + t).Value = 4
Else
If Sheet2.Cells(s, 16 + t).Value = "A-" Then
Sheet2.Cells(s, 16 + t).Value = 3.7
Else
If Sheet2.Cells(s, 16 + t).Value = "B+" Then
Sheet2.Cells(s, 16 + t).Value = 3.3
Else
If Sheet2.Cells(s, 16 + t).Value = "B" Then
Sheet2.Cells(s, 16 + t).Value = 3
Else
If Sheet2.Cells(s, 16 + t).Value = "B-" Then
Sheet2.Cells(s, 16 + t).Value = 2.7
Else
If Sheet2.Cells(s, 16 + t).Value = "C+" Then
Sheet2.Cells(s, 16 + t).Value = 2.3
Else
If Sheet2.Cells(s, 16 + t).Value = "C" Then
Sheet2.Cells(s, 16 + t).Value = 2
Else
If Sheet2.Cells(s, 16 + t).Value = "C-" Then
Sheet2.Cells(s, 16 + t).Value = 1.7
Else
If Sheet2.Cells(s, 16 + t).Value = "D" Then
Sheet2.Cells(s, 16 + t).Value = 1.3
Else
If Sheet2.Cells(s, 16 + t).Value = "F" Then
Sheet2.Cells(s, 16 + t).Value = 0
Else
If Sheet2.Cells(s, 16 + t).Value > 92.5 Then
Sheet2.Cells(s, 16 + t).Value = 4
Else
If Sheet2.Cells(s, 16 + t).Value > 82.5 Then
Sheet2.Cells(s, 16 + t).Value = 3.7
Else
If Sheet2.Cells(s, 16 + t).Value > 75 Then
Sheet2.Cells(s, 16 + t).Value = 3.3
Else
If Sheet2.Cells(s, 16 + t).Value > 67.5 Then
Sheet2.Cells(s, 16 + t).Value = 3
Else
If Sheet2.Cells(s, 16 + t).Value > 57.5 Then
Sheet2.Cells(s, 16 + t).Value = 2.7
Else
If Sheet2.Cells(s, 16 + t).Value > 50 Then
Sheet2.Cells(s, 16 + t).Value = 2.3
Else
If Sheet2.Cells(s, 16 + t).Value > 42.5 Then
Sheet2.Cells(s, 16 + t).Value = 2
Else
If Sheet2.Cells(s, 16 + t).Value > 32.5 Then
Sheet2.Cells(s, 16 + t).Value = 1.7
Else
If Sheet2.Cells(s, 16 + t).Value > 25 Then
Sheet2.Cells(s, 16 + t).Value = 1.3
Else
If Sheet2.Cells(s, 16 + t).Value >= 0 Then
Sheet2.Cells(s, 16 + t).Value = 0
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
Next

lastRow = Sheet2.Cells(Rows.Count, "A").End(xlUp).Row + 1

For s = 1 To lastRow
If UserForm1.TextBox1.Text = Sheet2.Cells(s, 1).Text Then
If Sheet2.Cells(s, 49).Value = "" Then

t = 28
If Sheet2.Cells(s, 10 + t).Value = "" Then
Sheet2.Cells(s, 10 + t).Value = ""
Else
If Sheet2.Cells(s, 10 + t).Value = "A" Then
Sheet2.Cells(s, 10 + t).Value = 4
Else
If Sheet2.Cells(s, 10 + t).Value = "A-" Then
Sheet2.Cells(s, 10 + t).Value = 3.7
Else
If Sheet2.Cells(s, 10 + t).Value = "B+" Then
Sheet2.Cells(s, 10 + t).Value = 3.3
Else
If Sheet2.Cells(s, 10 + t).Value = "B" Then
Sheet2.Cells(s, 10 + t).Value = 3
Else
If Sheet2.Cells(s, 10 + t).Value = "B-" Then
Sheet2.Cells(s, 10 + t).Value = 2.7
Else
If Sheet2.Cells(s, 10 + t).Value = "C+" Then
Sheet2.Cells(s, 10 + t).Value = 2.3
Else
If Sheet2.Cells(s, 10 + t).Value = "C" Then
Sheet2.Cells(s, 10 + t).Value = 2
Else
If Sheet2.Cells(s, 10 + t).Value = "C-" Then
Sheet2.Cells(s, 10 + t).Value = 1.7
Else
If Sheet2.Cells(s, 10 + t).Value = "D" Then
Sheet2.Cells(s, 10 + t).Value = 1.3
Else
If Sheet2.Cells(s, 10 + t).Value = "F" Then
Sheet2.Cells(s, 10 + t).Value = 0
Else
If Sheet2.Cells(s, 10 + t).Value > 92.5 Then
Sheet2.Cells(s, 10 + t).Value = 4
Else
If Sheet2.Cells(s, 10 + t).Value > 82.5 Then
Sheet2.Cells(s, 10 + t).Value = 3.7
Else
If Sheet2.Cells(s, 10 + t).Value > 75 Then
Sheet2.Cells(s, 10 + t).Value = 3.3
Else
If Sheet2.Cells(s, 10 + t).Value > 67.5 Then
Sheet2.Cells(s, 10 + t).Value = 3
Else
If Sheet2.Cells(s, 10 + t).Value > 57.5 Then
Sheet2.Cells(s, 10 + t).Value = 2.7
Else
If Sheet2.Cells(s, 10 + t).Value > 50 Then
Sheet2.Cells(s, 10 + t).Value = 2.3
Else
If Sheet2.Cells(s, 10 + t).Value > 42.5 Then
Sheet2.Cells(s, 10 + t).Value = 2
Else
If Sheet2.Cells(s, 10 + t).Value > 32.5 Then
Sheet2.Cells(s, 10 + t).Value = 1.7
Else
If Sheet2.Cells(s, 10 + t).Value > 25 Then
Sheet2.Cells(s, 10 + t).Value = 1.3
Else
If Sheet2.Cells(s, 10 + t).Value >= 0 Then
Sheet2.Cells(s, 10 + t).Value = 0
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
Next

lastRow = Sheet2.Cells(Rows.Count, "A").End(xlUp).Row + 1

For s = 1 To lastRow
If UserForm1.TextBox1.Text = Sheet2.Cells(s, 1).Text Then
If Sheet2.Cells(s, 49).Value = "" Then
t = 28
If Sheet2.Cells(s, 13 + t).Value = "" Then
Sheet2.Cells(s, 13 + t).Value = ""
Else
If Sheet2.Cells(s, 13 + t).Value = "A" Then
Sheet2.Cells(s, 13 + t).Value = 4
Else
If Sheet2.Cells(s, 13 + t).Value = "A-" Then
Sheet2.Cells(s, 13 + t).Value = 3.7
Else
If Sheet2.Cells(s, 13 + t).Value = "B+" Then
Sheet2.Cells(s, 13 + t).Value = 3.3
Else
If Sheet2.Cells(s, 13 + t).Value = "B" Then
Sheet2.Cells(s, 13 + t).Value = 3
Else
If Sheet2.Cells(s, 13 + t).Value = "B-" Then
Sheet2.Cells(s, 13 + t).Value = 2.7
Else
If Sheet2.Cells(s, 13 + t).Value = "C+" Then
Sheet2.Cells(s, 13 + t).Value = 2.3
Else
If Sheet2.Cells(s, 13 + t).Value = "C" Then
Sheet2.Cells(s, 13 + t).Value = 2
Else
If Sheet2.Cells(s, 13 + t).Value = "C-" Then
Sheet2.Cells(s, 13 + t).Value = 1.7
Else
If Sheet2.Cells(s, 13 + t).Value = "D" Then
Sheet2.Cells(s, 13 + t).Value = 1.3
Else
If Sheet2.Cells(s, 13 + t).Value = "F" Then
Sheet2.Cells(s, 13 + t).Value = 0
Else
If Sheet2.Cells(s, 13 + t).Value > 92.5 Then
Sheet2.Cells(s, 13 + t).Value = 4
Else
If Sheet2.Cells(s, 13 + t).Value > 82.5 Then
Sheet2.Cells(s, 13 + t).Value = 3.7
Else
If Sheet2.Cells(s, 13 + t).Value > 75 Then
Sheet2.Cells(s, 13 + t).Value = 3.3
Else
If Sheet2.Cells(s, 13 + t).Value > 67.5 Then
Sheet2.Cells(s, 13 + t).Value = 3
Else
If Sheet2.Cells(s, 13 + t).Value > 57.5 Then
Sheet2.Cells(s, 13 + t).Value = 2.7
Else
If Sheet2.Cells(s, 13 + t).Value > 50 Then
Sheet2.Cells(s, 13 + t).Value = 2.3
Else
If Sheet2.Cells(s, 13 + t).Value > 42.5 Then
Sheet2.Cells(s, 13 + t).Value = 2
Else
If Sheet2.Cells(s, 13 + t).Value > 32.5 Then
Sheet2.Cells(s, 13 + t).Value = 1.7
Else
If Sheet2.Cells(s, 13 + t).Value > 25 Then
Sheet2.Cells(s, 13 + t).Value = 1.3
Else
If Sheet2.Cells(s, 13 + t).Value >= 0 Then
Sheet2.Cells(s, 13 + t).Value = 0
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
Next

lastRow = Sheet2.Cells(Rows.Count, "A").End(xlUp).Row + 1
'For i = 1 To 10
For s = 1 To lastRow
If UserForm1.TextBox1.Text = Sheet2.Cells(s, 1).Text Then
If Sheet2.Cells(s, 49).Value = "" Then
t = 28
If Sheet2.Cells(s, 16 + t).Value = "" Then
Sheet2.Cells(s, 16 + t).Value = ""
Else
If Sheet2.Cells(s, 16 + t).Value = "A" Then
Sheet2.Cells(s, 16 + t).Value = 4
Else
If Sheet2.Cells(s, 16 + t).Value = "A-" Then
Sheet2.Cells(s, 16 + t).Value = 3.7
Else
If Sheet2.Cells(s, 16 + t).Value = "B+" Then
Sheet2.Cells(s, 16 + t).Value = 3.3
Else
If Sheet2.Cells(s, 16 + t).Value = "B" Then
Sheet2.Cells(s, 16 + t).Value = 3
Else
If Sheet2.Cells(s, 16 + t).Value = "B-" Then
Sheet2.Cells(s, 16 + t).Value = 2.7
Else
If Sheet2.Cells(s, 16 + t).Value = "C+" Then
Sheet2.Cells(s, 16 + t).Value = 2.3
Else
If Sheet2.Cells(s, 16 + t).Value = "C" Then
Sheet2.Cells(s, 16 + t).Value = 2
Else
If Sheet2.Cells(s, 16 + t).Value = "C-" Then
Sheet2.Cells(s, 16 + t).Value = 1.7
Else
If Sheet2.Cells(s, 16 + t).Value = "D" Then
Sheet2.Cells(s, 16 + t).Value = 1.3
Else
If Sheet2.Cells(s, 16 + t).Value = "F" Then
Sheet2.Cells(s, 16 + t).Value = 0
Else
If Sheet2.Cells(s, 16 + t).Value > 92.5 Then
Sheet2.Cells(s, 16 + t).Value = 4
Else
If Sheet2.Cells(s, 16 + t).Value > 82.5 Then
Sheet2.Cells(s, 16 + t).Value = 3.7
Else
If Sheet2.Cells(s, 16 + t).Value > 75 Then
Sheet2.Cells(s, 16 + t).Value = 3.3
Else
If Sheet2.Cells(s, 16 + t).Value > 67.5 Then
Sheet2.Cells(s, 16 + t).Value = 3
Else
If Sheet2.Cells(s, 16 + t).Value > 57.5 Then
Sheet2.Cells(s, 16 + t).Value = 2.7
Else
If Sheet2.Cells(s, 16 + t).Value > 50 Then
Sheet2.Cells(s, 16 + t).Value = 2.3
Else
If Sheet2.Cells(s, 16 + t).Value > 42.5 Then
Sheet2.Cells(s, 16 + t).Value = 2
Else
If Sheet2.Cells(s, 16 + t).Value > 32.5 Then
Sheet2.Cells(s, 16 + t).Value = 1.7
Else
If Sheet2.Cells(s, 16 + t).Value > 25 Then
Sheet2.Cells(s, 16 + t).Value = 1.3
Else
If Sheet2.Cells(s, 16 + t).Value >= 0 Then
Sheet2.Cells(s, 16 + t).Value = 0
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
Next


lastRow = Sheet2.Cells(Rows.Count, "A").End(xlUp).Row + 1
'For i = 1 To 10
For s = 1 To lastRow
If UserForm1.TextBox1.Text = Sheet2.Cells(s, 1).Text Then
If Sheet2.Cells(s, 63).Value = "" Then

t = 42
If Sheet2.Cells(s, 10 + t).Value = "" Then
Sheet2.Cells(s, 10 + t).Value = ""
Else
If Sheet2.Cells(s, 10 + t).Value = "A" Then
Sheet2.Cells(s, 10 + t).Value = 4
Else
If Sheet2.Cells(s, 10 + t).Value = "A-" Then
Sheet2.Cells(s, 10 + t).Value = 3.7
Else
If Sheet2.Cells(s, 10 + t).Value = "B+" Then
Sheet2.Cells(s, 10 + t).Value = 3.3
Else
If Sheet2.Cells(s, 10 + t).Value = "B" Then
Sheet2.Cells(s, 10 + t).Value = 3
Else
If Sheet2.Cells(s, 10 + t).Value = "B-" Then
Sheet2.Cells(s, 10 + t).Value = 2.7
Else
If Sheet2.Cells(s, 10 + t).Value = "C+" Then
Sheet2.Cells(s, 10 + t).Value = 2.3
Else
If Sheet2.Cells(s, 10 + t).Value = "C" Then
Sheet2.Cells(s, 10 + t).Value = 2
Else
If Sheet2.Cells(s, 10 + t).Value = "C-" Then
Sheet2.Cells(s, 10 + t).Value = 1.7
Else
If Sheet2.Cells(s, 10 + t).Value = "D" Then
Sheet2.Cells(s, 10 + t).Value = 1.3
Else
If Sheet2.Cells(s, 10 + t).Value = "F" Then
Sheet2.Cells(s, 10 + t).Value = 0
Else
If Sheet2.Cells(s, 10 + t).Value > 92.5 Then
Sheet2.Cells(s, 10 + t).Value = 4
Else
If Sheet2.Cells(s, 10 + t).Value > 82.5 Then
Sheet2.Cells(s, 10 + t).Value = 3.7
Else
If Sheet2.Cells(s, 10 + t).Value > 75 Then
Sheet2.Cells(s, 10 + t).Value = 3.3
Else
If Sheet2.Cells(s, 10 + t).Value > 67.5 Then
Sheet2.Cells(s, 10 + t).Value = 3
Else
If Sheet2.Cells(s, 10 + t).Value > 57.5 Then
Sheet2.Cells(s, 10 + t).Value = 2.7
Else
If Sheet2.Cells(s, 10 + t).Value > 50 Then
Sheet2.Cells(s, 10 + t).Value = 2.3
Else
If Sheet2.Cells(s, 10 + t).Value > 42.5 Then
Sheet2.Cells(s, 10 + t).Value = 2
Else
If Sheet2.Cells(s, 10 + t).Value > 32.5 Then
Sheet2.Cells(s, 10 + t).Value = 1.7
Else
If Sheet2.Cells(s, 10 + t).Value > 25 Then
Sheet2.Cells(s, 10 + t).Value = 1.3
Else
If Sheet2.Cells(s, 10 + t).Value >= 0 Then
Sheet2.Cells(s, 10 + t).Value = 0
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
Next

lastRow = Sheet2.Cells(Rows.Count, "A").End(xlUp).Row + 1

For s = 1 To lastRow
If UserForm1.TextBox1.Text = Sheet2.Cells(s, 1).Text Then
If Sheet2.Cells(s, 63).Value = "" Then
t = 42
If Sheet2.Cells(s, 13 + t).Value = "" Then
Sheet2.Cells(s, 13 + t).Value = ""
Else
If Sheet2.Cells(s, 13 + t).Value = "A" Then
Sheet2.Cells(s, 13 + t).Value = 4
Else
If Sheet2.Cells(s, 13 + t).Value = "A-" Then
Sheet2.Cells(s, 13 + t).Value = 3.7
Else
If Sheet2.Cells(s, 13 + t).Value = "B+" Then
Sheet2.Cells(s, 13 + t).Value = 3.3
Else
If Sheet2.Cells(s, 13 + t).Value = "B" Then
Sheet2.Cells(s, 13 + t).Value = 3
Else
If Sheet2.Cells(s, 13 + t).Value = "B-" Then
Sheet2.Cells(s, 13 + t).Value = 2.7
Else
If Sheet2.Cells(s, 13 + t).Value = "C+" Then
Sheet2.Cells(s, 13 + t).Value = 2.3
Else
If Sheet2.Cells(s, 13 + t).Value = "C" Then
Sheet2.Cells(s, 13 + t).Value = 2
Else
If Sheet2.Cells(s, 13 + t).Value = "C-" Then
Sheet2.Cells(s, 13 + t).Value = 1.7
Else
If Sheet2.Cells(s, 13 + t).Value = "D" Then
Sheet2.Cells(s, 13 + t).Value = 1.3
Else
If Sheet2.Cells(s, 13 + t).Value = "F" Then
Sheet2.Cells(s, 13 + t).Value = 0
Else
If Sheet2.Cells(s, 13 + t).Value > 92.5 Then
Sheet2.Cells(s, 13 + t).Value = 4
Else
If Sheet2.Cells(s, 13 + t).Value > 82.5 Then
Sheet2.Cells(s, 13 + t).Value = 3.7
Else
If Sheet2.Cells(s, 13 + t).Value > 75 Then
Sheet2.Cells(s, 13 + t).Value = 3.3
Else
If Sheet2.Cells(s, 13 + t).Value > 67.5 Then
Sheet2.Cells(s, 13 + t).Value = 3
Else
If Sheet2.Cells(s, 13 + t).Value > 57.5 Then
Sheet2.Cells(s, 13 + t).Value = 2.7
Else
If Sheet2.Cells(s, 13 + t).Value > 50 Then
Sheet2.Cells(s, 13 + t).Value = 2.3
Else
If Sheet2.Cells(s, 13 + t).Value > 42.5 Then
Sheet2.Cells(s, 13 + t).Value = 2
Else
If Sheet2.Cells(s, 13 + t).Value > 32.5 Then
Sheet2.Cells(s, 13 + t).Value = 1.7
Else
If Sheet2.Cells(s, 13 + t).Value > 25 Then
Sheet2.Cells(s, 13 + t).Value = 1.3
Else
If Sheet2.Cells(s, 13 + t).Value >= 0 Then
Sheet2.Cells(s, 13 + t).Value = 0
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
Next

lastRow = Sheet2.Cells(Rows.Count, "A").End(xlUp).Row + 1

For s = 1 To lastRow
If UserForm1.TextBox1.Text = Sheet2.Cells(s, 1).Text Then
If Sheet2.Cells(s, 63).Value = "" Then
t = 42
If Sheet2.Cells(s, 16 + t).Value = "" Then
Sheet2.Cells(s, 16 + t).Value = ""
Else
If Sheet2.Cells(s, 16 + t).Value = "A" Then
Sheet2.Cells(s, 16 + t).Value = 4
Else
If Sheet2.Cells(s, 16 + t).Value = "A-" Then
Sheet2.Cells(s, 16 + t).Value = 3.7
Else
If Sheet2.Cells(s, 16 + t).Value = "B+" Then
Sheet2.Cells(s, 16 + t).Value = 3.3
Else
If Sheet2.Cells(s, 16 + t).Value = "B" Then
Sheet2.Cells(s, 16 + t).Value = 3
Else
If Sheet2.Cells(s, 16 + t).Value = "B-" Then
Sheet2.Cells(s, 16 + t).Value = 2.7
Else
If Sheet2.Cells(s, 16 + t).Value = "C+" Then
Sheet2.Cells(s, 16 + t).Value = 2.3
Else
If Sheet2.Cells(s, 16 + t).Value = "C" Then
Sheet2.Cells(s, 16 + t).Value = 2
Else
If Sheet2.Cells(s, 16 + t).Value = "C-" Then
Sheet2.Cells(s, 16 + t).Value = 1.7
Else
If Sheet2.Cells(s, 16 + t).Value = "D" Then
Sheet2.Cells(s, 16 + t).Value = 1.3
Else
If Sheet2.Cells(s, 16 + t).Value = "F" Then
Sheet2.Cells(s, 16 + t).Value = 0
Else
If Sheet2.Cells(s, 16 + t).Value > 92.5 Then
Sheet2.Cells(s, 16 + t).Value = 4
Else
If Sheet2.Cells(s, 16 + t).Value > 82.5 Then
Sheet2.Cells(s, 16 + t).Value = 3.7
Else
If Sheet2.Cells(s, 16 + t).Value > 75 Then
Sheet2.Cells(s, 16 + t).Value = 3.3
Else
If Sheet2.Cells(s, 16 + t).Value > 67.5 Then
Sheet2.Cells(s, 16 + t).Value = 3
Else
If Sheet2.Cells(s, 16 + t).Value > 57.5 Then
Sheet2.Cells(s, 16 + t).Value = 2.7
Else
If Sheet2.Cells(s, 16 + t).Value > 50 Then
Sheet2.Cells(s, 16 + t).Value = 2.3
Else
If Sheet2.Cells(s, 16 + t).Value > 42.5 Then
Sheet2.Cells(s, 16 + t).Value = 2
Else
If Sheet2.Cells(s, 16 + t).Value > 32.5 Then
Sheet2.Cells(s, 16 + t).Value = 1.7
Else
If Sheet2.Cells(s, 16 + t).Value > 25 Then
Sheet2.Cells(s, 16 + t).Value = 1.3
Else
If Sheet2.Cells(s, 16 + t).Value >= 0 Then
Sheet2.Cells(s, 16 + t).Value = 0
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
Next


lastRow = Sheet2.Cells(Rows.Count, "A").End(xlUp).Row + 1

For s = 1 To lastRow
If UserForm1.TextBox1.Text = Sheet2.Cells(s, 1).Text Then
If Sheet2.Cells(s, 77).Value = "" Then

t = 56
If Sheet2.Cells(s, 10 + t).Value = "" Then
Sheet2.Cells(s, 10 + t).Value = ""
Else
If Sheet2.Cells(s, 10 + t).Value = "A" Then
Sheet2.Cells(s, 10 + t).Value = 4
Else
If Sheet2.Cells(s, 10 + t).Value = "A-" Then
Sheet2.Cells(s, 10 + t).Value = 3.7
Else
If Sheet2.Cells(s, 10 + t).Value = "B+" Then
Sheet2.Cells(s, 10 + t).Value = 3.3
Else
If Sheet2.Cells(s, 10 + t).Value = "B" Then
Sheet2.Cells(s, 10 + t).Value = 3
Else
If Sheet2.Cells(s, 10 + t).Value = "B-" Then
Sheet2.Cells(s, 10 + t).Value = 2.7
Else
If Sheet2.Cells(s, 10 + t).Value = "C+" Then
Sheet2.Cells(s, 10 + t).Value = 2.3
Else
If Sheet2.Cells(s, 10 + t).Value = "C" Then
Sheet2.Cells(s, 10 + t).Value = 2
Else
If Sheet2.Cells(s, 10 + t).Value = "C-" Then
Sheet2.Cells(s, 10 + t).Value = 1.7
Else
If Sheet2.Cells(s, 10 + t).Value = "D" Then
Sheet2.Cells(s, 10 + t).Value = 1.3
Else
If Sheet2.Cells(s, 10 + t).Value = "F" Then
Sheet2.Cells(s, 10 + t).Value = 0
Else
If Sheet2.Cells(s, 10 + t).Value > 92.5 Then
Sheet2.Cells(s, 10 + t).Value = 4
Else
If Sheet2.Cells(s, 10 + t).Value > 82.5 Then
Sheet2.Cells(s, 10 + t).Value = 3.7
Else
If Sheet2.Cells(s, 10 + t).Value > 75 Then
Sheet2.Cells(s, 10 + t).Value = 3.3
Else
If Sheet2.Cells(s, 10 + t).Value > 67.5 Then
Sheet2.Cells(s, 10 + t).Value = 3
Else
If Sheet2.Cells(s, 10 + t).Value > 57.5 Then
Sheet2.Cells(s, 10 + t).Value = 2.7
Else
If Sheet2.Cells(s, 10 + t).Value > 50 Then
Sheet2.Cells(s, 10 + t).Value = 2.3
Else
If Sheet2.Cells(s, 10 + t).Value > 42.5 Then
Sheet2.Cells(s, 10 + t).Value = 2
Else
If Sheet2.Cells(s, 10 + t).Value > 32.5 Then
Sheet2.Cells(s, 10 + t).Value = 1.7
Else
If Sheet2.Cells(s, 10 + t).Value > 25 Then
Sheet2.Cells(s, 10 + t).Value = 1.3
Else
If Sheet2.Cells(s, 10 + t).Value >= 0 Then
Sheet2.Cells(s, 10 + t).Value = 0
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
Next

lastRow = Sheet2.Cells(Rows.Count, "A").End(xlUp).Row + 1
'For i = 1 To 10
For s = 1 To lastRow
If UserForm1.TextBox1.Text = Sheet2.Cells(s, 1).Text Then
If Sheet2.Cells(s, 77).Value = "" Then
t = 56
If Sheet2.Cells(s, 13 + t).Value = "" Then
Sheet2.Cells(s, 13 + t).Value = ""
Else
If Sheet2.Cells(s, 13 + t).Value = "A" Then
Sheet2.Cells(s, 13 + t).Value = 4
Else
If Sheet2.Cells(s, 13 + t).Value = "A-" Then
Sheet2.Cells(s, 13 + t).Value = 3.7
Else
If Sheet2.Cells(s, 13 + t).Value = "B+" Then
Sheet2.Cells(s, 13 + t).Value = 3.3
Else
If Sheet2.Cells(s, 13 + t).Value = "B" Then
Sheet2.Cells(s, 13 + t).Value = 3
Else
If Sheet2.Cells(s, 13 + t).Value = "B-" Then
Sheet2.Cells(s, 13 + t).Value = 2.7
Else
If Sheet2.Cells(s, 13 + t).Value = "C+" Then
Sheet2.Cells(s, 13 + t).Value = 2.3
Else
If Sheet2.Cells(s, 13 + t).Value = "C" Then
Sheet2.Cells(s, 13 + t).Value = 2
Else
If Sheet2.Cells(s, 13 + t).Value = "C-" Then
Sheet2.Cells(s, 13 + t).Value = 1.7
Else
If Sheet2.Cells(s, 13 + t).Value = "D" Then
Sheet2.Cells(s, 13 + t).Value = 1.3
Else
If Sheet2.Cells(s, 13 + t).Value = "F" Then
Sheet2.Cells(s, 13 + t).Value = 0
Else
If Sheet2.Cells(s, 13 + t).Value > 92.5 Then
Sheet2.Cells(s, 13 + t).Value = 4
Else
If Sheet2.Cells(s, 13 + t).Value > 82.5 Then
Sheet2.Cells(s, 13 + t).Value = 3.7
Else
If Sheet2.Cells(s, 13 + t).Value > 75 Then
Sheet2.Cells(s, 13 + t).Value = 3.3
Else
If Sheet2.Cells(s, 13 + t).Value > 67.5 Then
Sheet2.Cells(s, 13 + t).Value = 3
Else
If Sheet2.Cells(s, 13 + t).Value > 57.5 Then
Sheet2.Cells(s, 13 + t).Value = 2.7
Else
If Sheet2.Cells(s, 13 + t).Value > 50 Then
Sheet2.Cells(s, 13 + t).Value = 2.3
Else
If Sheet2.Cells(s, 13 + t).Value > 42.5 Then
Sheet2.Cells(s, 13 + t).Value = 2
Else
If Sheet2.Cells(s, 13 + t).Value > 32.5 Then
Sheet2.Cells(s, 13 + t).Value = 1.7
Else
If Sheet2.Cells(s, 13 + t).Value > 25 Then
Sheet2.Cells(s, 13 + t).Value = 1.3
Else
If Sheet2.Cells(s, 13 + t).Value >= 0 Then
Sheet2.Cells(s, 13 + t).Value = 0
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
Next


lastRow = Sheet2.Cells(Rows.Count, "A").End(xlUp).Row + 1
'For i = 1 To 10
For s = 1 To lastRow
If UserForm1.TextBox1.Text = Sheet2.Cells(s, 1).Text Then
If Sheet2.Cells(s, 77).Value = "" Then
t = 56
If Sheet2.Cells(s, 16 + t).Value = "" Then
Sheet2.Cells(s, 16 + t).Value = ""
Else
If Sheet2.Cells(s, 16 + t).Value = "A" Then
Sheet2.Cells(s, 16 + t).Value = 4
Else
If Sheet2.Cells(s, 16 + t).Value = "A-" Then
Sheet2.Cells(s, 16 + t).Value = 3.7
Else
If Sheet2.Cells(s, 16 + t).Value = "B+" Then
Sheet2.Cells(s, 16 + t).Value = 3.3
Else
If Sheet2.Cells(s, 16 + t).Value = "B" Then
Sheet2.Cells(s, 16 + t).Value = 3
Else
If Sheet2.Cells(s, 16 + t).Value = "B-" Then
Sheet2.Cells(s, 16 + t).Value = 2.7
Else
If Sheet2.Cells(s, 16 + t).Value = "C+" Then
Sheet2.Cells(s, 16 + t).Value = 2.3
Else
If Sheet2.Cells(s, 16 + t).Value = "C" Then
Sheet2.Cells(s, 16 + t).Value = 2
Else
If Sheet2.Cells(s, 16 + t).Value = "C-" Then
Sheet2.Cells(s, 16 + t).Value = 1.7
Else
If Sheet2.Cells(s, 16 + t).Value = "D" Then
Sheet2.Cells(s, 16 + t).Value = 1.3
Else
If Sheet2.Cells(s, 16 + t).Value = "F" Then
Sheet2.Cells(s, 16 + t).Value = 0
Else
If Sheet2.Cells(s, 16 + t).Value > 92.5 Then
Sheet2.Cells(s, 16 + t).Value = 4
Else
If Sheet2.Cells(s, 16 + t).Value > 82.5 Then
Sheet2.Cells(s, 16 + t).Value = 3.7
Else
If Sheet2.Cells(s, 16 + t).Value > 75 Then
Sheet2.Cells(s, 16 + t).Value = 3.3
Else
If Sheet2.Cells(s, 16 + t).Value > 67.5 Then
Sheet2.Cells(s, 16 + t).Value = 3
Else
If Sheet2.Cells(s, 16 + t).Value > 57.5 Then
Sheet2.Cells(s, 16 + t).Value = 2.7
Else
If Sheet2.Cells(s, 16 + t).Value > 50 Then
Sheet2.Cells(s, 16 + t).Value = 2.3
Else
If Sheet2.Cells(s, 16 + t).Value > 42.5 Then
Sheet2.Cells(s, 16 + t).Value = 2
Else
If Sheet2.Cells(s, 16 + t).Value > 32.5 Then
Sheet2.Cells(s, 16 + t).Value = 1.7
Else
If Sheet2.Cells(s, 16 + t).Value > 25 Then
Sheet2.Cells(s, 16 + t).Value = 1.3
Else
If Sheet2.Cells(s, 16 + t).Value >= 0 Then
Sheet2.Cells(s, 16 + t).Value = 0
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
Next


lastRow = Sheet2.Cells(Rows.Count, "A").End(xlUp).Row + 1
'For i = 1 To 10
For s = 1 To lastRow
If UserForm1.TextBox1.Text = Sheet2.Cells(s, 1).Text Then
If Sheet2.Cells(s, 91).Value = "" Then

t = 70
If Sheet2.Cells(s, 10 + t).Value = "" Then
Sheet2.Cells(s, 10 + t).Value = ""
Else
If Sheet2.Cells(s, 10 + t).Value = "A" Then
Sheet2.Cells(s, 10 + t).Value = 4
Else
If Sheet2.Cells(s, 10 + t).Value = "A-" Then
Sheet2.Cells(s, 10 + t).Value = 3.7
Else
If Sheet2.Cells(s, 10 + t).Value = "B+" Then
Sheet2.Cells(s, 10 + t).Value = 3.3
Else
If Sheet2.Cells(s, 10 + t).Value = "B" Then
Sheet2.Cells(s, 10 + t).Value = 3
Else
If Sheet2.Cells(s, 10 + t).Value = "B-" Then
Sheet2.Cells(s, 10 + t).Value = 2.7
Else
If Sheet2.Cells(s, 10 + t).Value = "C+" Then
Sheet2.Cells(s, 10 + t).Value = 2.3
Else
If Sheet2.Cells(s, 10 + t).Value = "C" Then
Sheet2.Cells(s, 10 + t).Value = 2
Else
If Sheet2.Cells(s, 10 + t).Value = "C-" Then
Sheet2.Cells(s, 10 + t).Value = 1.7
Else
If Sheet2.Cells(s, 10 + t).Value = "D" Then
Sheet2.Cells(s, 10 + t).Value = 1.3
Else
If Sheet2.Cells(s, 10 + t).Value = "F" Then
Sheet2.Cells(s, 10 + t).Value = 0
Else
If Sheet2.Cells(s, 10 + t).Value > 92.5 Then
Sheet2.Cells(s, 10 + t).Value = 4
Else
If Sheet2.Cells(s, 10 + t).Value > 82.5 Then
Sheet2.Cells(s, 10 + t).Value = 3.7
Else
If Sheet2.Cells(s, 10 + t).Value > 75 Then
Sheet2.Cells(s, 10 + t).Value = 3.3
Else
If Sheet2.Cells(s, 10 + t).Value > 67.5 Then
Sheet2.Cells(s, 10 + t).Value = 3
Else
If Sheet2.Cells(s, 10 + t).Value > 57.5 Then
Sheet2.Cells(s, 10 + t).Value = 2.7
Else
If Sheet2.Cells(s, 10 + t).Value > 50 Then
Sheet2.Cells(s, 10 + t).Value = 2.3
Else
If Sheet2.Cells(s, 10 + t).Value > 42.5 Then
Sheet2.Cells(s, 10 + t).Value = 2
Else
If Sheet2.Cells(s, 10 + t).Value > 32.5 Then
Sheet2.Cells(s, 10 + t).Value = 1.7
Else
If Sheet2.Cells(s, 10 + t).Value > 25 Then
Sheet2.Cells(s, 10 + t).Value = 1.3
Else
If Sheet2.Cells(s, 10 + t).Value >= 0 Then
Sheet2.Cells(s, 10 + t).Value = 0
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
Next


lastRow = Sheet2.Cells(Rows.Count, "A").End(xlUp).Row + 1
'For i = 1 To 10
For s = 1 To lastRow
If UserForm1.TextBox1.Text = Sheet2.Cells(s, 1).Text Then
If Sheet2.Cells(s, 91).Value = "" Then
t = 70
If Sheet2.Cells(s, 13 + t).Value = "" Then
Sheet2.Cells(s, 13 + t).Value = ""
Else
If Sheet2.Cells(s, 13 + t).Value = "A" Then
Sheet2.Cells(s, 13 + t).Value = 4
Else
If Sheet2.Cells(s, 13 + t).Value = "A-" Then
Sheet2.Cells(s, 13 + t).Value = 3.7
Else
If Sheet2.Cells(s, 13 + t).Value = "B+" Then
Sheet2.Cells(s, 13 + t).Value = 3.3
Else
If Sheet2.Cells(s, 13 + t).Value = "B" Then
Sheet2.Cells(s, 13 + t).Value = 3
Else
If Sheet2.Cells(s, 13 + t).Value = "B-" Then
Sheet2.Cells(s, 13 + t).Value = 2.7
Else
If Sheet2.Cells(s, 13 + t).Value = "C+" Then
Sheet2.Cells(s, 13 + t).Value = 2.3
Else
If Sheet2.Cells(s, 13 + t).Value = "C" Then
Sheet2.Cells(s, 13 + t).Value = 2
Else
If Sheet2.Cells(s, 13 + t).Value = "C-" Then
Sheet2.Cells(s, 13 + t).Value = 1.7
Else
If Sheet2.Cells(s, 13 + t).Value = "D" Then
Sheet2.Cells(s, 13 + t).Value = 1.3
Else
If Sheet2.Cells(s, 13 + t).Value = "F" Then
Sheet2.Cells(s, 13 + t).Value = 0
Else
If Sheet2.Cells(s, 13 + t).Value > 92.5 Then
Sheet2.Cells(s, 13 + t).Value = 4
Else
If Sheet2.Cells(s, 13 + t).Value > 82.5 Then
Sheet2.Cells(s, 13 + t).Value = 3.7
Else
If Sheet2.Cells(s, 13 + t).Value > 75 Then
Sheet2.Cells(s, 13 + t).Value = 3.3
Else
If Sheet2.Cells(s, 13 + t).Value > 67.5 Then
Sheet2.Cells(s, 13 + t).Value = 3
Else
If Sheet2.Cells(s, 13 + t).Value > 57.5 Then
Sheet2.Cells(s, 13 + t).Value = 2.7
Else
If Sheet2.Cells(s, 13 + t).Value > 50 Then
Sheet2.Cells(s, 13 + t).Value = 2.3
Else
If Sheet2.Cells(s, 13 + t).Value > 42.5 Then
Sheet2.Cells(s, 13 + t).Value = 2
Else
If Sheet2.Cells(s, 13 + t).Value > 32.5 Then
Sheet2.Cells(s, 13 + t).Value = 1.7
Else
If Sheet2.Cells(s, 13 + t).Value > 25 Then
Sheet2.Cells(s, 13 + t).Value = 1.3
Else
If Sheet2.Cells(s, 13 + t).Value >= 0 Then
Sheet2.Cells(s, 13 + t).Value = 0
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
Next


lastRow = Sheet2.Cells(Rows.Count, "A").End(xlUp).Row + 1
'For i = 1 To 10
For s = 1 To lastRow
If UserForm1.TextBox1.Text = Sheet2.Cells(s, 1).Text Then
If Sheet2.Cells(s, 91).Value = "" Then
t = 70
If Sheet2.Cells(s, 16 + t).Value = "" Then
Sheet2.Cells(s, 16 + t).Value = ""
Else
If Sheet2.Cells(s, 16 + t).Value = "A" Then
Sheet2.Cells(s, 16 + t).Value = 4
Else
If Sheet2.Cells(s, 16 + t).Value = "A-" Then
Sheet2.Cells(s, 16 + t).Value = 3.7
Else
If Sheet2.Cells(s, 16 + t).Value = "B+" Then
Sheet2.Cells(s, 16 + t).Value = 3.3
Else
If Sheet2.Cells(s, 16 + t).Value = "B" Then
Sheet2.Cells(s, 16 + t).Value = 3
Else
If Sheet2.Cells(s, 16 + t).Value = "B-" Then
Sheet2.Cells(s, 16 + t).Value = 2.7
Else
If Sheet2.Cells(s, 16 + t).Value = "C+" Then
Sheet2.Cells(s, 16 + t).Value = 2.3
Else
If Sheet2.Cells(s, 16 + t).Value = "C" Then
Sheet2.Cells(s, 16 + t).Value = 2
Else
If Sheet2.Cells(s, 16 + t).Value = "C-" Then
Sheet2.Cells(s, 16 + t).Value = 1.7
Else
If Sheet2.Cells(s, 16 + t).Value = "D" Then
Sheet2.Cells(s, 16 + t).Value = 1.3
Else
If Sheet2.Cells(s, 16 + t).Value = "F" Then
Sheet2.Cells(s, 16 + t).Value = 0
Else
If Sheet2.Cells(s, 16 + t).Value > 92.5 Then
Sheet2.Cells(s, 16 + t).Value = 4
Else
If Sheet2.Cells(s, 16 + t).Value > 82.5 Then
Sheet2.Cells(s, 16 + t).Value = 3.7
Else
If Sheet2.Cells(s, 16 + t).Value > 75 Then
Sheet2.Cells(s, 16 + t).Value = 3.3
Else
If Sheet2.Cells(s, 16 + t).Value > 67.5 Then
Sheet2.Cells(s, 16 + t).Value = 3
Else
If Sheet2.Cells(s, 16 + t).Value > 57.5 Then
Sheet2.Cells(s, 16 + t).Value = 2.7
Else
If Sheet2.Cells(s, 16 + t).Value > 50 Then
Sheet2.Cells(s, 16 + t).Value = 2.3
Else
If Sheet2.Cells(s, 16 + t).Value > 42.5 Then
Sheet2.Cells(s, 16 + t).Value = 2
Else
If Sheet2.Cells(s, 16 + t).Value > 32.5 Then
Sheet2.Cells(s, 16 + t).Value = 1.7
Else
If Sheet2.Cells(s, 16 + t).Value > 25 Then
Sheet2.Cells(s, 16 + t).Value = 1.3
Else
If Sheet2.Cells(s, 16 + t).Value >= 0 Then
Sheet2.Cells(s, 16 + t).Value = 0
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
Next


lastRow = Sheet2.Cells(Rows.Count, "A").End(xlUp).Row + 1
'For i = 1 To 10
For s = 1 To lastRow
If UserForm1.TextBox1.Text = Sheet2.Cells(s, 1).Text Then
If Sheet2.Cells(s, 105).Value = "" Then

t = 84
If Sheet2.Cells(s, 10 + t).Value = "" Then
Sheet2.Cells(s, 10 + t).Value = ""
Else
If Sheet2.Cells(s, 10 + t).Value = "A" Then
Sheet2.Cells(s, 10 + t).Value = 4
Else
If Sheet2.Cells(s, 10 + t).Value = "A-" Then
Sheet2.Cells(s, 10 + t).Value = 3.7
Else
If Sheet2.Cells(s, 10 + t).Value = "B+" Then
Sheet2.Cells(s, 10 + t).Value = 3.3
Else
If Sheet2.Cells(s, 10 + t).Value = "B" Then
Sheet2.Cells(s, 10 + t).Value = 3
Else
If Sheet2.Cells(s, 10 + t).Value = "B-" Then
Sheet2.Cells(s, 10 + t).Value = 2.7
Else
If Sheet2.Cells(s, 10 + t).Value = "C+" Then
Sheet2.Cells(s, 10 + t).Value = 2.3
Else
If Sheet2.Cells(s, 10 + t).Value = "C" Then
Sheet2.Cells(s, 10 + t).Value = 2
Else
If Sheet2.Cells(s, 10 + t).Value = "C-" Then
Sheet2.Cells(s, 10 + t).Value = 1.7
Else
If Sheet2.Cells(s, 10 + t).Value = "D" Then
Sheet2.Cells(s, 10 + t).Value = 1.3
Else
If Sheet2.Cells(s, 10 + t).Value = "F" Then
Sheet2.Cells(s, 10 + t).Value = 0
Else
If Sheet2.Cells(s, 10 + t).Value > 92.5 Then
Sheet2.Cells(s, 10 + t).Value = 4
Else
If Sheet2.Cells(s, 10 + t).Value > 82.5 Then
Sheet2.Cells(s, 10 + t).Value = 3.7
Else
If Sheet2.Cells(s, 10 + t).Value > 75 Then
Sheet2.Cells(s, 10 + t).Value = 3.3
Else
If Sheet2.Cells(s, 10 + t).Value > 67.5 Then
Sheet2.Cells(s, 10 + t).Value = 3
Else
If Sheet2.Cells(s, 10 + t).Value > 57.5 Then
Sheet2.Cells(s, 10 + t).Value = 2.7
Else
If Sheet2.Cells(s, 10 + t).Value > 50 Then
Sheet2.Cells(s, 10 + t).Value = 2.3
Else
If Sheet2.Cells(s, 10 + t).Value > 42.5 Then
Sheet2.Cells(s, 10 + t).Value = 2
Else
If Sheet2.Cells(s, 10 + t).Value > 32.5 Then
Sheet2.Cells(s, 10 + t).Value = 1.7
Else
If Sheet2.Cells(s, 10 + t).Value > 25 Then
Sheet2.Cells(s, 10 + t).Value = 1.3
Else
If Sheet2.Cells(s, 10 + t).Value >= 0 Then
Sheet2.Cells(s, 10 + t).Value = 0
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
Next


lastRow = Sheet2.Cells(Rows.Count, "A").End(xlUp).Row + 1
'For i = 1 To 10
For s = 1 To lastRow
If UserForm1.TextBox1.Text = Sheet2.Cells(s, 1).Text Then
If Sheet2.Cells(s, 105).Value = "" Then
t = 84
If Sheet2.Cells(s, 13 + t).Value = "" Then
Sheet2.Cells(s, 13 + t).Value = ""
Else
If Sheet2.Cells(s, 13 + t).Value = "A" Then
Sheet2.Cells(s, 13 + t).Value = 4
Else
If Sheet2.Cells(s, 13 + t).Value = "A-" Then
Sheet2.Cells(s, 13 + t).Value = 3.7
Else
If Sheet2.Cells(s, 13 + t).Value = "B+" Then
Sheet2.Cells(s, 13 + t).Value = 3.3
Else
If Sheet2.Cells(s, 13 + t).Value = "B" Then
Sheet2.Cells(s, 13 + t).Value = 3
Else
If Sheet2.Cells(s, 13 + t).Value = "B-" Then
Sheet2.Cells(s, 13 + t).Value = 2.7
Else
If Sheet2.Cells(s, 13 + t).Value = "C+" Then
Sheet2.Cells(s, 13 + t).Value = 2.3
Else
If Sheet2.Cells(s, 13 + t).Value = "C" Then
Sheet2.Cells(s, 13 + t).Value = 2
Else
If Sheet2.Cells(s, 13 + t).Value = "C-" Then
Sheet2.Cells(s, 13 + t).Value = 1.7
Else
If Sheet2.Cells(s, 13 + t).Value = "D" Then
Sheet2.Cells(s, 13 + t).Value = 1.3
Else
If Sheet2.Cells(s, 13 + t).Value = "F" Then
Sheet2.Cells(s, 13 + t).Value = 0
Else
If Sheet2.Cells(s, 13 + t).Value > 92.5 Then
Sheet2.Cells(s, 13 + t).Value = 4
Else
If Sheet2.Cells(s, 13 + t).Value > 82.5 Then
Sheet2.Cells(s, 13 + t).Value = 3.7
Else
If Sheet2.Cells(s, 13 + t).Value > 75 Then
Sheet2.Cells(s, 13 + t).Value = 3.3
Else
If Sheet2.Cells(s, 13 + t).Value > 67.5 Then
Sheet2.Cells(s, 13 + t).Value = 3
Else
If Sheet2.Cells(s, 13 + t).Value > 57.5 Then
Sheet2.Cells(s, 13 + t).Value = 2.7
Else
If Sheet2.Cells(s, 13 + t).Value > 50 Then
Sheet2.Cells(s, 13 + t).Value = 2.3
Else
If Sheet2.Cells(s, 13 + t).Value > 42.5 Then
Sheet2.Cells(s, 13 + t).Value = 2
Else
If Sheet2.Cells(s, 13 + t).Value > 32.5 Then
Sheet2.Cells(s, 13 + t).Value = 1.7
Else
If Sheet2.Cells(s, 13 + t).Value > 25 Then
Sheet2.Cells(s, 13 + t).Value = 1.3
Else
If Sheet2.Cells(s, 13 + t).Value >= 0 Then
Sheet2.Cells(s, 13 + t).Value = 0
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
Next


lastRow = Sheet2.Cells(Rows.Count, "A").End(xlUp).Row + 1
'For i = 1 To 10
For s = 1 To lastRow
If UserForm1.TextBox1.Text = Sheet2.Cells(s, 1).Text Then
If Sheet2.Cells(s, 105).Value = "" Then
t = 84
If Sheet2.Cells(s, 16 + t).Value = "" Then
Sheet2.Cells(s, 16 + t).Value = ""
Else
If Sheet2.Cells(s, 16 + t).Value = "A" Then
Sheet2.Cells(s, 16 + t).Value = 4
Else
If Sheet2.Cells(s, 16 + t).Value = "A-" Then
Sheet2.Cells(s, 16 + t).Value = 3.7
Else
If Sheet2.Cells(s, 16 + t).Value = "B+" Then
Sheet2.Cells(s, 16 + t).Value = 3.3
Else
If Sheet2.Cells(s, 16 + t).Value = "B" Then
Sheet2.Cells(s, 16 + t).Value = 3
Else
If Sheet2.Cells(s, 16 + t).Value = "B-" Then
Sheet2.Cells(s, 16 + t).Value = 2.7
Else
If Sheet2.Cells(s, 16 + t).Value = "C+" Then
Sheet2.Cells(s, 16 + t).Value = 2.3
Else
If Sheet2.Cells(s, 16 + t).Value = "C" Then
Sheet2.Cells(s, 16 + t).Value = 2
Else
If Sheet2.Cells(s, 16 + t).Value = "C-" Then
Sheet2.Cells(s, 16 + t).Value = 1.7
Else
If Sheet2.Cells(s, 16 + t).Value = "D" Then
Sheet2.Cells(s, 16 + t).Value = 1.3
Else
If Sheet2.Cells(s, 16 + t).Value = "F" Then
Sheet2.Cells(s, 16 + t).Value = 0
Else
If Sheet2.Cells(s, 16 + t).Value > 92.5 Then
Sheet2.Cells(s, 16 + t).Value = 4
Else
If Sheet2.Cells(s, 16 + t).Value > 82.5 Then
Sheet2.Cells(s, 16 + t).Value = 3.7
Else
If Sheet2.Cells(s, 16 + t).Value > 75 Then
Sheet2.Cells(s, 16 + t).Value = 3.3
Else
If Sheet2.Cells(s, 16 + t).Value > 67.5 Then
Sheet2.Cells(s, 16 + t).Value = 3
Else
If Sheet2.Cells(s, 16 + t).Value > 57.5 Then
Sheet2.Cells(s, 16 + t).Value = 2.7
Else
If Sheet2.Cells(s, 16 + t).Value > 50 Then
Sheet2.Cells(s, 16 + t).Value = 2.3
Else
If Sheet2.Cells(s, 16 + t).Value > 42.5 Then
Sheet2.Cells(s, 16 + t).Value = 2
Else
If Sheet2.Cells(s, 16 + t).Value > 32.5 Then
Sheet2.Cells(s, 16 + t).Value = 1.7
Else
If Sheet2.Cells(s, 16 + t).Value > 25 Then
Sheet2.Cells(s, 16 + t).Value = 1.3
Else
If Sheet2.Cells(s, 16 + t).Value >= 0 Then
Sheet2.Cells(s, 16 + t).Value = 0
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
Next

End Sub

قام بنشر

السلام عليكم

كما ذكر أخي ياسر  من الأحسن إرسال ملف ، لكن الاختصار ربما طريقه تكون باستعمال : Select Case

و كمثال لبداية الكود :

Sub GGG()
lastRow = Sheet2.Cells(Rows.Count, "A").End(xlUp).Row + 1

For s = 1 To lastRow
If UserForm1.TextBox1.Text = Sheet2.Cells(s, 1).Text Then
If Sheet2.Cells(s, 21).Value = "" Then

t = 0
Select Case Sheet2.Cells(s, 10 + t).Value
Case Is = "A": Sheet2.Cells(s, 10 + t).Value = 4
Case Is = "A-": Sheet2.Cells(s, 10 + t).Value = 3.7
Case Is = "B": Sheet2.Cells(s, 10 + t).Value = 3
Case Is = "B+": Sheet2.Cells(s, 10 + t).Value = 3.3
'-...............
'-...............
'-...............
'-...............
'-...............
'-...............
End If
End Select
Next

'-...............
'-...............
'-...............
'-...............
'-...............
'-...............

End Sub

 

انشئ حساب جديد او قم بتسجيل دخولك لتتمكن من اضافه تعليق جديد

يجب ان تكون عضوا لدينا لتتمكن من التعليق

انشئ حساب جديد

سجل حسابك الجديد لدينا في الموقع بمنتهي السهوله .

سجل حساب جديد

تسجيل دخول

هل تمتلك حساب بالفعل ؟ سجل دخولك من هنا.

سجل دخولك الان
  • تصفح هذا الموضوع مؤخراً   0 اعضاء متواجدين الان

    • لايوجد اعضاء مسجلون يتصفحون هذه الصفحه
×
×
  • اضف...

Important Information