|
我是要在B2单元格中套入自定义公式,如果A2中有包含D例的区域名称就将其区域名称填 写出来
Function FuckCounta(店名 As Range) As String
Dim x%, n As Long
x = Application.WorksheetFunction.CountA(Columns("D"))
For n = 1 To x
If Application.WorksheetFunction.Find(cell(4, n), 店名) >= 1 Then 客户 = cell(4, n)
n = n + 1
Next
End Function
请帮我看一下这个编程,每次都说编译错误 子过程或函数未定义
- Function FuckCounta(Rng As Range) As String
- Dim arr
- Dim i As Long
- arr = Range("D2:D" & Range("D65536").End(xlUp).Row)
- For i = 1 To UBound(arr, 1)
- If InStr(Rng, arr(i, 1)) Then
- FuckCounta = IIf(FuckCounta = "", arr(i, 1), FuckCounta & "," & arr(i, 1))
- End If
- Next i
- End Function
复制代码
|
|