اشرف النعاس قام بنشر أبريل 24, 2016 قام بنشر أبريل 24, 2016 اريد اختصار هذا الكود للابتعاد عن مشكلة 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
ياسر خليل أبو البراء قام بنشر أبريل 24, 2016 قام بنشر أبريل 24, 2016 الموضوع لا أعتقد ستكون فيه استجابة بهذا الشكل بدون ملف مرفق أخي الكريم أشرف تقبل تحياتي
أبو حنــــين قام بنشر أبريل 25, 2016 قام بنشر أبريل 25, 2016 السلام عليكم كما ذكر أخي ياسر من الأحسن إرسال ملف ، لكن الاختصار ربما طريقه تكون باستعمال : 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
الردود الموصى بها
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.