Maybe like this with a command button instead of comboboxes.
Private Sub CommandButton1_Click()
Dim Course As Range, Level As Range, Hours As Integer, r As Long
Set Class = Range("B2")
Set Level = Range("B3")
Hours = Range("B4").Value
If IsEmpty(Range("B2")) Then
MsgBox "Please select a Class"
Exit Sub
ElseIf IsEmpty(Range("B3")) Then
MsgBox "Please select a course Level"
Exit Sub
ElseIf IsEmpty(Range("B4")) Then
MsgBox "Please enter number of Hours earned"
Exit Sub
Else
r = Application.Match(Class, Columns(4))
Select Case Level.Value
Case "Intro"
Range("E" & r).Value = Range("E" & r).Value + Hours
Case "Basic"
Range("H" & r).Value = Range("H" & r).Value + Hours
Case "Intermediate"
Range("K" & r).Value = Range("K" & r).Value + Hours
Case "Advanced"
Range("N" & r).Value = Range("N" & r).Value + Hours
Case Else
End Select
End If
Range("B2:B4").ClearContents
Range("B2").Select
End Sub
Bookmarks