我不知道爲什麼聲明不起作用。沒有錯誤發生,但同時在表單中沒有結果。VBA:如果聲明不起作用
Sub won()
Dim ws As Worksheet
Dim lastrow As Long
Set ws = ThisWorkbook.Sheets("Data imput")
lastrow = ws.Cells(ws.Rows.Count, 1).End(xlUp).Row
For i = 3 To lastrow
If ws.Cells(i, 6) = "customer" Then
ws.Cells(i, 16) = 1
End If
Next i
MsgBox "done!"
End Sub
也許它的工作,它的計算結果爲'FALSE'? – David
嗨,可能是一個愚蠢的答案,但是是「客戶」正確書寫, –
它也不顯示False。 – aannie