Udf给出错误(VALUE)

时间:2017-10-27 06:38:30

标签: excel-vba user-defined-functions vba excel

有一个UDF迭代列的单元格并执行原始操作。似乎一切都是正确的,但由于某种原因给出了错误#VALUE!

    Function дляппр05(Diapozon As Range) As Long
    'для ситуации
    Application.Volatile
    Dim n As Long
    Dim C As Range

    n = 0
    For Each C In Diapozon.Rows
    If С.Value = 1 And C.Offset(0, 1).Value = 1 Then
    n = n + 1
    End If
    Next C

    дляппр05 = n
    End Function

0 个答案:

没有答案