Dim a As Long
a = range("A617:A737").Copy
s = range("A739:A" & EndLine + 2).PasteSpecial
Dim FinalLine As Long
FinalLine = Cells(Rows.Count, "A").End(xlUp).Row
range("B739").AutoFill Destination:=range("B739:B" & FinalLine - 2)
Cells(FinalLine + 10, 2).Formula = "= 5"
Cells("B" & FinalLine + 3).FormulaArray = _
"= Min(If(B739:B" & FinalLine - 2 = FinalLine + 10 & " , A$739:A$" & EndLine + 2))"
错误是在10之后突出显示逗号。
答案 0 :(得分:1)
Cells(FinalLine + 3, "B").FormulaArray = _
"= MIN(IF(B739:B" & (FinalLine - 2) & "=5 , A$739:A$" & (EndLine + 2) & ", """"))"
答案 1 :(得分:0)
更正后的代码......
Cells( FinalLine + 3,"B").FormulaArray = "= Min(If(B739:B" & FinalLine - 2 = FinalLine + 10 & " , A$739:A$" & EndLine + 2 & ", """"))"