代码如下:
Function sheettype(sheet As range)
Select Case True Case Application.WorksheetFunction.IsText(sheet)
sheettype = "文本"
Case Application.WorksheetFunction.IsLogical(sheet)
sheettype = "逻辑值"
Case IsEmpty(sheet)
sheettype = "空值"
Case IsNumeric(sheet)
sheettype = "数值"
Case Application.IsError(sheet)
sheettype = "错误值"
Case IsDate(sheet)
sheettype = "日期"
End Select
End Function