返回列表 上一主題 發帖

[發問] IF多重判斷,請幫忙,謝謝!(VBA寫法轉成函數寫法)

[發問] IF多重判斷,請幫忙,謝謝!(VBA寫法轉成函數寫法)

1.jpg

寫在G3儲存格

將此VBA寫法改成函數寫法

If Sheets("工作表1").Cells(I, "D") < 0.5 Then

Sheets("工作表1").Cells(I, "G") = "新人"

ElseIf Sheets("工作表").Cells(I, "F") = "陳奕迅" Or Sheets("Assy1").Cells(I, "F") = "劉德華" Then

Sheets("工作表").Cells(I, "G") = "leader"

ElseIf Sheets("工作表1").Cells(I, "F") = "張學友" Or Sheets("工作表").Cells(I, "F") = "郭富城" Then

Sheets("工作表1").Cells(I, "G") = "leader(代)"

ElseIf Sheets("工作表1").Cells(I, "F") = "李焜耀" Or Sheets("工作表1").Cells(I, "F") = "郭台銘" Or Sheets("工作表1").Cells(I, "F") = "小蝦" Then

Sheets("工作表1").Cells(I, "G") = "訓練員"

ElseIf Sheets("工作表1").Cells(I, "F") = "邰智源" Or Sheets("工作表1").Cells(I, "F") = "黎明" Then

Sheets("工作表1").Cells(I, "G") = "LAB專員"

ElseIf Sheets("工作表1").Cells(I, "F") > 0.5 Then

Sheets("工作表1").Cells(I, "G") = "老鳥"

End If

Next

        靜思自在 : 愛不是要求對方,而是要由自身的付出。
返回列表 上一主題