Microsoft Office Tutorials and References
In Depth Information
Case IsEmpty(UpperLeft.Value)
CELLTYPE = “Blank”
Case WorksheetFunction.IsText(UpperLeft)
Case WorksheetFunction.IsLogical(UpperLeft.Value)
CELLTYPE = “Logical”
Case WorksheetFunction.IsErr(UpperLeft.Value)
CELLTYPE = “Error”
Case IsDate(UpperLeft.Value)
Case InStr(1, UpperLeft.Text, “:”) <> 0
Case IsNumeric(UpperLeft.Value)
CELLTYPE = “Value”
End Select
End Function
Figure 26-1 shows the CELLTYPE function in use. Column B contains formulas that use the CELLTYPE func-
tion with an argument from column A. For example, cell B1 contains the following formula:
The workbook celltype function.xlsm that demonstrates the CELLTYPE function is
available at this topic's website.
Search JabSto ::

Custom Search