Information Category Formula

HERE ARE SOME INFORMATION CATEGORY FORMULA


1-ERROR.TYPE function 

This article describes the formula syntax and usage of the ERROR.TYPE function in Microsoft Excel. 

Description 

Returns a number corresponding to one of the error values in Microsoft Excel or returns the #N/A error if no error exists. You can use ERROR.TYPE in an IF function to test for an error value and return a text string, such as a message, instead of the error value. 

Syntax 

ERROR.TYPE(error_val) 

The ERROR.TYPE function syntax has the following arguments: 

  • Error_val    Required. The error value whose identifying number you want to find. Although error_val can be the actual error value, it will usually be a reference to a cell containing a formula that you want to test. 

If error_val is 

ERROR.TYPE returns 

#NULL! 

1 

#DIV/0! 

2 

#VALUE! 

3 

#REF! 

4 

#NAME? 

5 

#NUM! 

6 

#N/A 

7 

#GETTING_DATA 

8 

Anything else 

#N/A 

Example 

Copy the example data in the following table, and paste it in cell A1 of a new Excel worksheet. For formulas to show results, select them, press F2, and then press Enter. If you need to, you can adjust the column widths to see all the data. 

Data 

 

 

#NULL! 

 

 

#DIV/0! 

 

 

Formula 

Description 

Result 

=ERROR.TYPE(A2) 

Number of the #NULL! Error(1). 

1 

=IF(ERROR.TYPE(A3)<3,CHOOSE(ERROR.TYPE(A3),"Ranges do not intersect","The divisor is zero")) 

Checks cell A3 to see whether the cell contains either the #NULL! error value or the #DIV/0! error value. If it does, then the number for the error value is used in the CHOOSE worksheet function to display one of two messages; otherwise, the #N/A error value is returned. 

The divisor i 

 

2- IS functions 

Description 

Each of these functions, referred to collectively as the IS functions, checks the specified value and returns TRUE or FALSE depending on the outcome. For example, the ISBLANK function returns the logical value TRUE if the value argument is a reference to an empty cell; otherwise it returns FALSE. 

You can use an IS function to get information about a value before performing a calculation or other action with it. For example, you can use the ISERROR function in conjunction with the IF function to perform a different action if an error occurs: 

= IF( ISERROR(A1), "An error occurred.", A1 * 2) 

This formula checks to see if an error condition exists in A1. If so, the IF function returns the message "An error occurred." If no error exists, the IF function performs the calculation A1*2. 

Syntax 

ISBLANK(value) 

ISERR(value) 

ISERROR(value) 

ISLOGICAL(value) 

ISNA(value) 

ISNONTEXT(value) 

ISNUMBER(value) 

ISREF(value) 

ISTEXT(value) 

The IS function syntax has the following argument: 

  • value    Required. The value that you want tested. The value argument can be a blank (empty cell), error, logical value, text, number, or reference value, or a name referring to any of these. 

Function 

Returns TRUE if 

ISBLANK 

Value refers to an empty cell. 

ISERR 

Value refers to any error value except #N/A. 

ISERROR 

Value refers to any error value (#N/A, #VALUE!, #REF!, #DIV/0!, #NUM!, #NAME?, or #NULL!). 

ISLOGICAL 

Value refers to a logical value. 

ISNA 

Value refers to the #N/A (value not available) error value. 

ISNONTEXT 

Value refers to any item that is not text. (Note that this function returns TRUE if the value refers to a blank cell.) 

ISNUMBER 

Value refers to a number. 

ISREF 

Value refers to a reference. 

ISTEXT 

Value refers to text. 

Remarks 

  • The value arguments of the IS functions are not converted. Any numeric values that are enclosed in double quotation marks are treated as text. For example, in most other functions where a number is required, the text value "19" is converted to the number 19. However, in the formula ISNUMBER("19"), "19" is not converted from a text value to a number value, and the ISNUMBER function returns FALSE. 

  • The IS functions are useful in formulas for testing the outcome of a calculation. When combined with the IF function, these functions provide a method for locating errors in formulas (see the following examples). 

Examples 

Example 1 

Copy the example data in the following table, and paste it in cell A1 of a new Excel worksheet. For formulas to show results, select them, press F2, and then press Enter. If you need to, you can adjust the column widths to see all the data. 

Formula 

Description 

Result 

=ISLOGICAL(TRUE) 

Checks whether TRUE is a logical value 

TRUE 

=ISLOGICAL("TRUE") 

Checks whether "TRUE" is a logical value 

FALSE 

=ISNUMBER(4) 

Checks whether 4 is a number 

TRUE 

=ISREF(G8) 

Checks whether G8 is a valid reference 

TRUE 

=ISREF(XYZ1) 

Checks whether XYZ1 is a valid reference 

FALSE 

Example 2 

Copy the example data in the following table, and paste it in cell A1 of a new Excel worksheet. For formulas to show results, select them, press F2, and then press Enter. If you need to, you can adjust the column widths to see all the data. 

Data 

 

 

Gold 

 

 

Region1 

 

 

#REF! 

 

 

330.92 

 

 

#N/A 

 

 

Formula 

Description 

Result 

=ISBLANK(A2) 

Checks whether cell A2 is blank. 

FALSE 

=ISERROR(A4) 

Checks whether the value in cell A4, #REF!, is an error. 

TRUE 

=ISNA(A4) 

Checks whether the value in cell A4, #REF!, is the #N/A error. 

FALSE 

=ISNA(A6) 

Checks whether the value in cell A6, #N/A, is the #N/A error. 

TRUE 

=ISERR(A6) 

Checks whether the value in cell A6, #N/A, is an error. 

FALSE 

=ISNUMBER(A5) 

Checks whether the value in cell A5, 330.92, is a number. 

TRUE 

=ISTEXT(A3) 

Checks whether the value in cell A3, Region1, is text. 

TRUE 

 

3- SHEET function 

 

This article describes the formula syntax and usage of the SHEET function in Microsoft Excel. 

Description 

Returns the sheet number of the reference sheet. 

Syntax 

SHEET(value) 

The SHEET function syntax has the following arguments. 

  • Value    Optional. Value is the name of a sheet or a reference for which you want the sheet number. If value is omitted, SHEET returns the number of the sheet that contains the function. 

Remarks 

  • SHEET includes all worksheets (visible, hidden, or very hidden) in addition to all other sheet types (macro, chart, or dialog sheets). 

  • If the value argument is not a valid value, SHEET returns the #REF! error value. For example, =SHEET(Sheet1!#REF) will return the #REF! error value. 

  • If the value argument is a sheet name that is not valid, SHEET returns the #NA error value. For example =SHEET(“badSheetName”) will return the #NA error value. 

  • SHEET is not available in the Object Model (OM) because the Object Model already includes similar functionality. 

Example 

Copy the example data in the following table, and paste it in cell A1 of a new Excel worksheet. For formulas to show results, select them, press F2, and then press Enter. If you need to, you can adjust the column widths to see all the data. 

Formula 

Description 

Result 

=SHEET(QSalesByRegion) 

Returns the sheet number that contains the defined name QSalesByRegion on Sheet2, and has a scope that makes it available to the entire workbook. 

2 

=SHEET(Table1) 

Returns the sheet number that contains the table named Table1 on Sheet2, and has a scope that makes it available to the entire workbook. 

2 

=SHEET(Hi_Temps) 

Returns the #NAME? error value because the defined name Hi_Temps is limited to the worksheet that contains it, Sheet2. 

#NAME? 

=SHEET("Stuff") 

Returns the sheet number of the worksheet named Stuff. 

3 

 

 

4-SHEETS function 

 

This article describes the formula syntax and usage of the SHEETS  function in Microsoft Excel. 

Description 

Returns the number of sheets in a reference. 

Syntax 

SHEETS(reference) 

The SHEETS function syntax has the following arguments. 

  • Reference    Optional. Reference is a reference for which you want to know the number of sheets it contains. If Reference is omitted, SHEETS returns the number of sheets in the workbook that contains the function. 

Remarks 

  • SHEETS includes all worksheets (visible, hidden, or very hidden) in addition to all other sheet types (macro, chart, or dialog sheets). 

  • If reference is not a valid value, SHEETS returns the #REF! error value. 

  • SHEETS is not available in the Object Model (OM) because the Object Model already includes similar functionality. 

Example 

Copy the example data in the following table, and paste it in cell A1 of a new Excel worksheet. For formulas to show results, select them, press F2, and then press Enter. If you need to, you can adjust the column widths to see all the data. 

Formula 

Description 

Result 

=SHEETS() 

Because there is no Reference argument specified, the total number of sheets in the workbook is returned (3). 

3 

=SHEETS(My3DRef) 

Returns the number of sheets in a 3D reference with the defined name My3DRef, which includes Sheet2 and Sheet3 (2). 

2 

 

5- TYPE function 

 

This article describes the formula syntax and usage of the TYPE function in Microsoft Excel. 

Description 

Returns the type of value. Use TYPE when the behavior of another function depends on the type of value in a particular cell. 

Syntax 

TYPE(value) 

The TYPE function syntax has the following arguments: 

  • Value    Required. Can be any Microsoft Excel value, such as a number, text, logical value, and so on. 

If value is 

TYPE returns 

Number 

1 

Text 

2 

Logical value 

4 

Error value 

16 

Array 

64 

Compound data 

128 

Remarks 

  • TYPE is most useful when you are using functions that can accept different types of data, such as ARGUMENT and INPUT. Use TYPE to find out what type of data is returned by a function or formula. 

  • You cannot use TYPE to determine whether a cell contains a formula. TYPE only determines the type of the resulting, or displayed, value. If value is a cell reference to a cell that contains a formula, TYPE returns the type of the formula's resulting value. 

Example 

Copy the example data in the following table, and paste it in cell A1 of a new Excel worksheet. For formulas to show results, select them, press F2, and then press Enter. If you need to, you can adjust the column widths to see all the data. 

Data 

 

 

Smith 

 

 

Formula 

Description 

Result 

=TYPE(A2) 

Returns the type of the value in A2. The Text type is indicated by 2. 

2 

=TYPE("Mr. "&A2) 

Returns the type of "Mr. Smith, which is Text. 

2 

=TYPE(2+A2) 

Returns the type of the formula in C6, which returns 16, the type for the error message #VALUE! The error message #VALUE! is shown in C7. 

16 

=(2+A2) 

The error value returned by the formula =(2+A2), which is used in C2. 

#VALUE! 

=TYPE({1,2;3,4}) 

Returns the type of an array constant, which is 64. 

64 


 











Previous Post Next Post