返回列表 上一主題 發帖

[發問] 請問我程序哪裡錯

[發問] 請問我程序哪裡錯

本帖最後由 john2006168 於 2010-10-7 23:40 編輯

test john.zip (11.46 KB)




Sub testexjohn()
Dim intscore As Integer
        
    For i = 2 To 31

intscore = Cells(i, 3)

If intscore < 15 Then
Cells(i, 4) = "Poor"

ElseIf intscore < 50 Then
Cells(i, 4) = "Fail"

ElseIf intscore < 85 Then
Cells(i, 4) = "Pass"

ElseIf intscore <= 100 Then

Cells(i, 4) = "Very Good"

End If


Cells(i, 2) = i


Cells(i, 2) = UCase(Left(Cells(i, 1), 1)) & LCase(Right(Cells(i, 1), Len(Cells(i, 1)) - 1))
Next

End Sub

没有发现有错的嘛,是这里?
Cells(i, 2) = UCase(Left(Cells(i, 1), 1)) & LCase(Right(Cells(i, 1), Len(Cells(i, 1)) - 1))

TOP

回復 2# et5323
附檔中有 &   
執行後找不出 哪出錯!   應樓主請說 是哪裡出錯?  好了解.

TOP

回復 3# GBKEE


    Grade 全部變成'"poor"

TOP

intscore = Cells(i, 3)
c欄空白=0
If intscore < 15 Then
Cells(i, 4) = "Poor"

TOP

回復 5# oobird


    哦...明白,不小心delete了...

TOP

        靜思自在 : 稻穗結得越飽滿,越會往下垂,一個人越有成就,就要越有謙沖的胸襟。
返回列表 上一主題