赞
踩
自定义函数是自动化各种Excel重复操作的重要函数,我们可以用它实现各种自己的奇葩需求。但是当我退出VBA代码编辑界面调用时,却发现Excel找不到我定义的函数,那么可能有以下很多种原因可以导致上述的问题:
Function Merge_single(x As Range, y As Range) 'This function is to filter some infomations indicated and put them together
Dim wb As Object
Dim st As Object
Dim xx, yy As Range
Dim xstr, ystr As String
Dim rr As Integer
If x.rows.Count <> y.rows.Count Then
MsgBox "The variables you enter don't have the same column"
End If
Call del_text(x)
Call del_text(y)
ystr = Cells(y.Row, y.Column).Value
xstr = filter(x)
Merge_single = ystr & xstr
xstr = ""
ystr = ""
End Function
当解决问题后,在Excel界面可以像正常函数一样使用你的自定义函数。如下图所示。
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。