How do I obtain a reference to the current cell?
For example, if I want to display the width of column A, I could use the following:
=CELL("width", A2)
However, I want the formula to be something like this:
=CELL("width", THIS_CELL)
How do I obtain a reference to the current cell?
For example, if I want to display the width of column A, I could use the following:
=CELL("width", A2)
However, I want the formula to be something like this:
=CELL("width", THIS_CELL)
A2
is already a relative reference and will change when you move the cell or copy the formula.
You could use
=CELL("width", INDIRECT(ADDRESS(ROW(), COLUMN())))
but Johannes's answer will work just as well
Leave off the second argument entirely, it is an optional argument. When you omit it, the function uses the host cell as the reference.
=CELL("width")