小编Sil*_*awk的帖子

#NUM!用户定义函数中的错误

我做了一个新的函数调用length,它测试字符的数量,如果计数大于5,则显示"错误结果".但是,函数的结果是#NUM!如果测试是5个字符或更少,则显示结果.

怎么了?

Function length (number as integer)
    If ( Len (CStr (number)) > 5 ) then
        length = "error"
    End if
    If ( Len (Cstr (number)) <6) then
        length = "the count is true"
    End if
End Function
Run Code Online (Sandbox Code Playgroud)

excel vba excel-vba

4
推荐指数
1
解决办法
400
查看次数

标签 统计

excel ×1

excel-vba ×1

vba ×1