Tag: null

VBA如何从函数返回null

我有这个function Public Function parseEmployee(ByVal employeeId As Integer, _ ByVal ws As Worksheet) As employee Dim emp As New employee Dim empRow As Range If sheetContainsEmployee(employeeId, ws) Then Set empRow = ws.Rows(ws.Columns(ID_COLUMN).Find(employeeId).Row) emp.id = employeeId emp.Name = empRow.Cells(1, NAME_COLUMN).Value Else emp = Null ' Heres what I'd like to do End If parseEmployee = emp End […]

在Excel中输出一个NULL单元值

可能重复: 在Excel中从公式返回空单元格 我有一个IF声明。 如果一个cell = n,那么做一些事情,否则输出NULL =IF(A1=5, "Success", NULL) // #NAME? =IF(A1=5, "Success", "NULL") // NULL (as in text, not actually NULL!) =IF(A1=5, "Success", "") // blank but not NULL =IF(A1=5, "Success", 0) // zero value but not NULL