0
我想在VBA中執行COUNTIF,並且我得到了一些resom錯誤'438',我不知道爲什麼。VBA - Countif錯誤'438'
Option Explicit
Sub tools()
'
With Worksheets("Plans")
.Range("a:ar").AutoFilter Field:=2, Criteria1:="=Cv", Operator:=xlOr, Criteria2:="=Se"
.rows("6:6").Select
.Range(Selection, Selection.End(xlDown)).Select
.Selection.Delete Shift:=xlUp
.ShowAllData
.Range("A2:A" & .Cells(rows.Count, "e").End(xlUp).Row).FormulaR1C11 = "=COUNTIF(c[5],RC[5])"
.Range("A2:a" & .Cells(rows.Count, "e").End(xlUp).Row) = Range("A2:a" & .Cells(rows.Count, "e").End(xlUp).Row).Value2
End With
End Sub
工程很好,非常感謝。 –
不用客氣 – user3598756