CELL Function
The CELL function retrieves detailed information about the formatting, location, or contents of a cell in Excel and Google Sheets.
=CELL(info_type, [reference])Quick Answer
CELL function CELL function retrieves detailed information about the formatting, location, or contents of a cell in your spreadsheet. With syntax `=CELL(info_type, [reference])`, it returns various cell properties such as address, format, width, color, type, and more.
=CELL(info_type, [reference])Practical Examples
Get Cell Address
Retrieve the absolute reference address of a specific cell
Check Cell Format Type
Determine if a cell contains text, number, or is blank
Get Column Width
Return the width of a column containing the specified cell
Retrieve Cell Contents
Get the value or text stored in a referenced cell
Conditional Formatting Detection
Check if a cell has specific formatting applied for conditional logic
Common Errors and Solutions
CELL returns #NAME? error
The info_type argument is not enclosed in double quotes, or you've misspelled an info_type option.
Always wrap info_type in quotes: =CELL("address", A1) not =CELL(address, A1). Verify spelling of info_type matches supported options exactly.
Example:
CELL returns #VALUE! error
The reference parameter is invalid, the cell reference doesn't exist, or you're using an Excel-specific info_type in Google Sheets.
Verify the cell reference exists and is accessible. Check that your info_type is supported on your platform (Google Sheets has limited options).
Test formulas in your target environment and use only cross-platform compatible info_types.
Example:
Incorrect or unexpected results
Using info_type options not supported in your platform version, or relying on the default behavior when reference is omitted.
Always specify the reference parameter explicitly. Test formulas in your target environment. Consult platform-specific documentation for supported info_type options.
Always specify the reference parameter rather than relying on default behavior.
Example:
Slow recalculation
CELL is volatile and recalculates on any worksheet change, causing performance degradation in large workbooks with many CELL formulas.
Minimize CELL usage in large spreadsheets. Consider converting CELL results to static values once initial analysis is complete. Use alternative non-volatile functions when possible.
Use CELL sparingly and convert to values when the analysis is complete.
Best Practices and Advanced Tips
Volatile Function Performance
CELL is a volatile function that recalculates whenever any change occurs in the workbook. In large spreadsheets with numerous CELL formulas, this can significantly impact performance. Use CELL sparingly and consider converting results to static values.
Platform Compatibility
Google Sheets supports only a subset of Excel's info_type options. If building cross-platform workbooks, restrict yourself to: "address", "col", "contents", "row", "type", and "width".
Always Specify Reference
While the reference parameter is optional, omitting it causes CELL to return information about the last changed cell—a behavior that produces unpredictable results. Always explicitly specify which cell you're analyzing.
Combine with INDIRECT
CELL's real power emerges when combined with other reference functions. Use CELL("address", range) with INDIRECT to create dynamic reference systems that adapt to spreadsheet structure changes.
Need Help with CELL Function?
Stop struggling with formula syntax. Use AskFormulas to generate validated formulas instantly with our AI-powered tool.
Example Excel formula:
Related Formulas
The ADDRESS function creates a cell reference as text from row and column numbers. Learn syntax, examples, and error solutions for building dynamic references.
Master the COLUMN function to return column numbers in Excel and Google Sheets. Learn syntax, examples, and dynamic reference techniques for powerful formulas.
Master the INDIRECT function to create dynamic cell references from text strings. Learn syntax, examples, and solutions for flexible Excel formulas.
The ROW function returns the row number of a cell reference or the current row if no reference is provided, essential for dynamic formulas and array operations.