【发布时间】:2015-05-30 17:44:06
【问题描述】:
我已经创建了这个函数:
Public Function getLastCellValue(ByVal row As Integer, ByVal column As String) As String
If (Cells(row, column).Value = "") Then
getLastCellValue = getLastCellValue(row - 1, column)
Else: getLastCellValue = Cells.Item(row, column).Value
End If
End Function
当我在单元格中使用它时:
=getLastCellValue(1,"C")
Excel 告诉我该函数包含错误并关注第二个参数:"C"。
我快疯了,因为我不明白这个错误。
【问题讨论】:
-
确保您的 Excel 语言使用逗号 (
,) 来分隔函数参数;如果你的名字告诉我你的国籍,我猜你使用的是意大利/西班牙系统(这意味着你应该用半列分隔输入(;)