用這個解決上一節(jié)的IF判斷感覺更方便
Sub 用select解決()
Select Case Cells(1, 2).Value
Case Is >= 90
Cells(2, 3) = "優(yōu)秀"
Case Is >= 80
Cells(2, 3) = "良好"
Case Is >= 70
Cells(2, 3) = "中等"
Case Else
Cells(2, 3) = "較差"
End Select
End Sub
Sub b()
Select Case [b1].Value
Case "A"
MsgBox "您是A型血,非常不錯的血型"
Case "B"
MsgBox "B型血也是個不錯的血型!"
Case "AB"
MsgBox "您是萬能受血者!"
Case "O"
MsgBox "您是萬能施血者!"
Case Else
MsgBox "對不起,沒有您這種血型!"
End Select
End Sub
承擔(dān)因您的行為而導(dǎo)致的法律責(zé)任,
本站有權(quán)保留或刪除有爭議評論。
參與本評論即表明您已經(jīng)閱讀并接受
上述條款。