Excel Function Tip ๐ฏ | Mastering the CELL Function to Extract Cell Info! ๐
Hey everyone ๐โ๏ธ
Today, I’m introducing a function that may seem unfamiliar,
but it’s incredibly useful for automation and debugging in real-world Excel tasks:
the CELL function! ๐
โ What is the CELL function?
CELL helps you:
๐ Extract metadata or properties of a cell — like its address, row, column, format, file name, and more.
It’s not for retrieving “data,” but rather for getting info about the cell itself!
๐ Basic Syntax
- info_type: The type of information to return (e.g., "address", "row", "filename")
- [reference]: The cell you want to inspect (if omitted, it uses the current cell)
Example 1) Get the address of a cell ๐งญ
๐ Returns: $A$5
Gives you the absolute reference of cell A5 as text.

Example 2) Get the current row number ๐ข
๐ Returns the row number of the cell where the formula is written.
(If this is in B7, the result is 7)
You can also get the column number with:


Example 3) Get full file path and sheet name ๐
๐ Example result:
C:\Users\Me\Documents\[Workbook.xlsx]Sheet1

โป Note: this only works after the file is saved!
๐ก Want just the sheet name? Try this formula:
๐ This extracts only the sheet name from the full file path.

Example 4) Check the cell format ๐จ
This returns format codes like:
- "G": General
- "F0": Number with no decimals
- "F2": Number with 2 decimal places
- "D4": Date format (e.g., YYYY/MM/DD)
โป Advanced use — helpful for debugging or conditional formatting triggers!

๐ Common info_type values for CELL
| "address" | Cell address (e.g., $B$3) |
| "row" | Row number |
| "col" | Column number |
| "filename" | Full path + file name + sheet |
| "contents" | Cell contents (the value) |
| "format" | Format code |
โ Summary
The CELL function is perfect for:
โ Getting row/column positions
โ Showing file name or sheet name dynamically
โ Document metadata automation
โ Conditional formatting / validation / debugging
You might not use it every day,
but when you do need cell-level info, it’s a must-have in your toolbox ๐
Next time I’ll introduce related functions like INFO, TYPE, and ISBLANK.
Until then, happy Excel-ing! ๐ป๐