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

    If Range("D3").Value >= 90 Then
    
        Range("E3").Value = "A"
    
    ElseIf Range("D3").Value >= 80 Then
    
        Range("E3").Value = "B"
    
    ElseIf Range("D3").Value >= 70 Then
    
        Range("E3").Value = "C"
    
    ElseIf Range("D3").Value >= 60 Then
    
        Range("E3").Value = "D"
    
    Else
        
        Range("E3").Value = "F"
    
    End If
    
End Sub