这是我的函数:为什么我的功能可以在Windows上使用,但不能在OS X上使用?
Function FindLast(searchTerm As String) As Integer
Set cell = Worksheets("nameofsheet").Columns("A").Find(what:=searchTerm, searchorder:=xlByColumns, searchdirection:=xlPrevious)
If cell Is Nothing Then
Debug.Print ("Text was not found")
FindLast = 0
Else
Debug.Print ("found")
FindLast = cell.row
End If
End Function
只是正常工作在Windows,但在Mac上没有。我在单元格中总是得到#REF!
错误。
您在每个平台上使用哪种版本的Excel? – brandonscript
@brandonscript excel 2016在这两个 – StB
它适用于Excel 2011中的我。您是否使用它作为UDF或在程序中? –