The CELL function in Excel is a useful tool that allows you to retrieve information about a cell’s formatting, location, or content. It can help you gain insights into various aspects of your spreadsheet, making it a valuable function for both beginners and advanced users.
Syntax
CELL(info_type, reference)
Arguments
info_type | The type of information you want to retrieve from the cell. This is a text value enclosed in double quotation marks. |
reference | The cell reference for which you want to get information. |
How to Use
The CELL function is used to retrieve information about a specified cell. The info_type argument defines the type of information you want to extract, and the reference argument points to the cell you want to examine.
Here are some common uses of the CELL function:
1. Get the Address of a Cell:
1 |
=CELL("address", A1) |
This formula will return the address of cell A1, which is “$A$1.”
2. Determine the Format of a Cell:
1 |
=CELL("format", B2) |
Use this formula to find out the format of cell B2, such as “General,” “Currency,” or “Date.”
3. Check if a Cell is Empty:
1 |
=CELL("type", C3) |
It will return “b” if the cell C3 contains a label or formula and “v” if it’s empty.
4. Retrieve the Sheet Name of a Cell:
1 |
=CELL("filename", D4) |
This formula will give you the full path to the workbook containing cell D4, which includes the sheet name.
5. Determine the Width of a Cell:
1 |
=CELL("width", E5) |
Use this formula to find out the width of cell E5 in characters.
Remember that the info_type argument should always be enclosed in double quotation marks, and the reference argument should point to the cell you want to inspect.
Keep in mind that the CELL function can be a valuable tool for understanding and manipulating your Excel data.