Sub 학점반환()

    Range("E3").ClearContents

    With WorksheetFunction
    
        Range("B3").Value = .RandBetween(50, 100)
        Range("C3").Value = .RandBetween(50, 100)
        Range("D3").Value = .Average(Range("B3:C3"))

    End With

    Select Case Range("D3").Value

        Case 90 To 100
    
            Range("E3").Value = "A"
    
        Case 80 To 89.9
        
            Range("E3").Value = "B"
    
        Case 70 To 79.9
        
            Range("E3").Value = "C"
    
        Case 60 To 69.9
        
            Range("E3").Value = "D"
    
        Case Else
        
            Range("E3").Value = "F"
    
    End Select
    
End Sub