Private Sub CommandButton1_Click()
Dim emptyRow As Long
Sheet3.Activate
emptyRow = WorksheetFunction.CountA(Range("A:A")) + 1
'SERVICE PROVIDER
Cells(emptyRow, 1).Value = TextBox1.Value
Cells(emptyRow, 1).Select
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlMedium
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
'CATEGORY
Cells(emptyRow, 2).Value = ListBox1.Value
Cells(emptyRow, 2).Select
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlMedium
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
'DELEGATED ACTIVITY
Cells(emptyRow, 3).Value = OptionButton1.Value
Cells(emptyRow, 3).Value = OptionButton2.Value
If OptionButton1.Value = True Then
Cells(emptyRow, 3).Value = "0"
End If
If OptionButton2.Value = True Then
Cells(emptyRow, 3).Value = "-2"
End If
Cells(emptyRow, 3).Select
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlMedium
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
'RECURRENT SERVICE
Cells(emptyRow, 4).Value = OptionButton3.Value
Cells(emptyRow, 4).Value = OptionButton4.Value
Cells(emptyRow, 4).Value = OptionButton5.Value
If OptionButton3.Value = True Then
Cells(emptyRow, 4).Value = "0"
End If
If OptionButton4.Value = True Then
Cells(emptyRow, 4).Value = "-1"
End If
If OptionButton5.Value = True Then
Cells(emptyRow, 4).Value = "-2"
End If
Cells(emptyRow, 4).Select
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlMedium
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
'LISTED ENTITY
Cells(emptyRow, 5).Value = OptionButton6.Value
Cells(emptyRow, 5).Value = OptionButton7.Value
Cells(emptyRow, 5).Value = OptionButton8.Value
If OptionButton6.Value = True Then
Cells(emptyRow, 5).Value = "1"
End If
If OptionButton7.Value = True Then
Cells(emptyRow, 5).Value = "0"
End If
If OptionButton8.Value = True Then
Cells(emptyRow, 5).Value = "-1"
End If
Cells(emptyRow, 5).Select
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlMedium
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
'REGULATED ENTITY
Cells(emptyRow, 6).Value = OptionButton9.Value
Cells(emptyRow, 6).Value = OptionButton10.Value
Cells(emptyRow, 6).Value = OptionButton11.Value
If OptionButton9.Value = True Then
Cells(emptyRow, 6).Value = "1"
End If
If OptionButton10.Value = True Then
Cells(emptyRow, 6).Value = "0"
End If
If OptionButton11.Value = True Then
Cells(emptyRow, 6).Value = "-1"
End If
Cells(emptyRow, 6).Select
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlMedium
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
'SANCTION
Cells(emptyRow, 7).Value = OptionButton12.Value
Cells(emptyRow, 7).Value = OptionButton13.Value
Cells(emptyRow, 7).Value = OptionButton14.Value
If OptionButton12.Value = True Then
Cells(emptyRow, 7).Value = "1"
End If
If OptionButton13.Value = True Then
Cells(emptyRow, 7).Value = "0"
End If
If OptionButton14.Value = True Then
Cells(emptyRow, 7).Value = "-1"
End If
Cells(emptyRow, 7).Select
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlMedium
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
'FINANCIAL STABILITY
Cells(emptyRow, 8).Value = OptionButton15.Value
Cells(emptyRow, 8).Value = OptionButton16.Value
If OptionButton15.Value = True Then
Cells(emptyRow, 8).Value = "1"
End If
If OptionButton16.Value = True Then
Cells(emptyRow, 8).Value = "-1"
End If
Cells(emptyRow, 8).Select
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlMedium
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
'COUNTRY RISK
Cells(emptyRow, 9).Value = OptionButton17.Value
Cells(emptyRow, 9).Value = OptionButton18.Value
Cells(emptyRow, 9).Value = OptionButton19.Value
If OptionButton17.Value = True Then
Cells(emptyRow, 9).Value = "1"
End If
If OptionButton18.Value = True Then
Cells(emptyRow, 9).Value = "0"
End If
If OptionButton19.Value = True Then
Cells(emptyRow, 9).Value = "-1"
End If
Cells(emptyRow, 9).Select
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlMedium
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
Cells(emptyRow, 10).Select
Cells(emptyRow, 10).Value = (Cells(emptyRow, 3).Value + Cells(emptyRow, 4).Value + Cells(emptyRow, 5).Value + Cells(emptyRow, 6).Value + Cells(emptyRow, 7).Value + Cells(emptyRow, 8).Value + Cells(emptyRow, 9).Value) / 7
Cells(emptyRow, 11).Select
Cells(emptyRow, 11).Value = Switch(X < 1, "Low", X > 5, "High", X, "Medium")
End Sub