Excel function in a class of functions, designed to return to their specific or regional, such as the cell information, such as the contents of the cell, format, number and so on, this type of function we call the information function. In this paper, we will do this type of function to a summary of understanding, at the same time for some commonly used functions and parameters to make an example of the application.
a cell for the return of the format, location or content of the information function CELL
CELL function to return a reference region for the upper-left corner of the cell format, location and other information or content. The form of its grammar, CELL (info_type, reference) for a text which Info_type value, specify the information needs of the type of cell. Reference is to obtain information on their cells. If ignored, the info_type as specified in the information will be changed back to the last cell.
First of all, look, info_type of possible values and the corresponding results.
type |
Info_type |
return the results |
location |
"address" |
quote the first reference cell, the text type. |
"col" |
primer used in subscript out of cells. |
"row" |
cell reference in the line number. |
"filename" |
document contains references (including full path), text type. If the target contains references that have not yet saved the worksheet, then return empty text (""). |
format |
"color" |
if negative cells show a different color, compared with 1, otherwise return 0. |
"format" |
with a different cell that corresponds to the digital format of the text value. The following table lists the text of the value of different formats. If cell negative to show different colors, then returned at the end of the text value added "-"; if positive cells or all cells are added in brackets, then the value in the text at the end of the return "( ). " |
"parentheses" |
if positive cells or all cells are added in brackets, compared with 1, Otherwise, return 0. |
"prefix" |
with different cell "sign prefix" value corresponds to the text. If the left-justified text cell, then back to single quotes ( '); if the cell text align right, then back to double quotes ( "); if the text of the cell center, then return to insert a character (^); if the cell text alignment at both ends, then the return of a backslash (\); If the other case, the return of empty text (""). |
"protect" |
If the cell is not locked, compared with 0; if locked cells, compared with 1. |
"type" |
and cell types of data values corresponding to the text. If the cell is empty, then return to "b". If the cell contains the text constants, then return to "l"; if the cell contains other elements, then return to "v". |
"width" |
rounded cells after the column width. Column width to a default font in units of the width of characters. |
content |
"contents" |
quoted in the upper left corner of the cell value: It is not the formula. |
When info_type to take a look at "format", as well as the reference for the set with a built-in digital format the cells when the CELL function to return text values.
Figure 1 function CELL mainly used with other compatible spreadsheet program. In the following example we have to learn how to use the CELL function to get the cell format, location and content information.
For example: you want to learn the cell A1 to B4 region such as the line number, column width, cell contents and other information.
Figure 2 |