TYPE function. Get cell data type.(Microsoft Excel)
Function to retrieve the data type, such as whether the value is a number or a string.
Temporary, disposable uses are appropriate.
When used for formulas that will remain forever, use the IS function whenever possible.
This is because it is easier to understand the meaning of the equation when you look at it later, and the judgment is more exact.
How it works
=TYPE(value)
Argument | Omission | Explanation |
---|---|---|
value | Required argument. Determination target. |
Results
Data type | Result |
---|---|
Numeric | 1 |
Text | 2 |
Boolean | 4 |
Error | 16 |
Array | 64 |
Example Results
The following is an example of the execution result.
Arrays are not recognized if the argument is a cell.
If the TYPE function is an array formula or an array of {} format is specified, it will be judged.
For practical use, it is necessary to memorize the relationship between the numbers 1-64 and the data type.
Therefore, other decision functions are better suited as functions to be kept in a file, and the TYPE function is suitable for temporary use.
Alternative means of determination.
Numeric
The ISNUMBER function is superior.
The TYPE function treats blank cells as zeroes and treats them as numeric values.
The ISNUMBER function is more exact, since a blank cell is FALSE.
Text
The ISTEXT function is recommended.
Boolean
The ISLOGICAL function is recommended.
Error
ISERROR and ISNA functions are recommended.
Array
There is no particular alternative.
However, since the array itself has few uses and there is little need to judge it, there is no particular obstacle.
---
Discussion
New Comments
No comments yet. Be the first one!