The following article introduces you to the CELL function - one of the functions in the information function group is very popular in Excel.
Description: The function returns information about the format or content of a cell.
Syntax: CELL (info_type, [reference])
Inside:
- info_type: Text value that determines the type of information returned, is a required parameter. Types of information returned:
+ info_type = address -> returns the address of the cell.
+ info_type = col -> returns the column number of the cell.
+ info_type = color -> returns the color of the cell.
+ info_type = contents -> returns the content of the cell.
+ info_type = filename -> returns the name including the full path.
+ info_type = format -> returns the format of the cell.
+ info_type = parentheses -> identify cells that use single quotes for positive values or all values, otherwise return 0.
+ info_type = prefix -> returns the cell label prefix.
+ info_type = protect -> determines if the cell is locked or not if it returns 1 value otherwise returns 0 value.
+ info_type = row -> returns the number of rows of the cell.
+ info_type = type -> returns the cell's data type.
+ info_type = width -> returns the width of the cell.
- reference: The cell that wants to return the corresponding information, which is an optional parameter if omitting the function that returns information for the last cell.
Attention:
- In case you change the format of a cell but then set another format -> must reset that sheet.
For example:
Determine the information of the cells described in the following data table:
- Define information about the number of rows of cells. In a cell to calculate enter the formula : = CELL ("row", C6)
- Press Enter -> return value is:
- Similarly determine the data type of the cell -> enter the formula: = CELL ("type", C7) -> press Enter -> return value is:
- Determine the content of the cell -> enter the formula: = CELL ("contents", C8) -> press Enter -> return value is:
- Similarly determine the format and address of the cell (corresponding format and type ) -> the results:
Above are instructions and some specific examples when using CELL function in Excel.
Good luck!