|
Sub IF条件判断之多条件等级划分()
If Sheet1.Range("b1") >= 90 Then
Sheet1.Range("b2") = "优秀"
ElseIf Sheet1.Range("b1") >= 80 Then
Sheet1.Range("b2") = "良好"
ElseIf Sheet1.Range("b1") >= 70 Then
Sheet1.Range("b2") = "中等"
Else
Sheet1.Range("b2") = "较差"
End If
End Sub
'VBA中的IIF函数与工作表函数(IF)的语法结一致
Sub IIF函数应用()
Cells(2, 3) = IIf(Cells(1, 2) > 80, "优秀", "不优秀")
End Sub
|
|