Freigeben über


Formula Watch: Use the Cell function to check column width, column number, and more

If you want to know more about the size, color, and contents of your cells in Excel, you should get to know the Cell function. For instance, to find out how wide a column is, just enter this into one of its cells:

=CELL("width")

If you want to list the filename and path in a cell, say to identify where the file lives and what it is called, use:

=CELL("filename")

To call up the address of the cell, as it it's referenced in Excel, use:

=CELL("address")

And since columns are lettered, you might want help counting them if you've scrolled far off to the right. Just enter this in any cell in your target column to translate the letter to a number (without the aid of your fingers and the alphabet song):

=CELL("col")

Unless you specify one or more cells, the CELL function returns the result for the last cell you touched. So if you try using it in more than one place or to track a specific cell for a more complex function, you may see the result change. If you're doing more than spot checking a value, be sure to enter a cell value or range like so:

=CELL("width",G1219)

Suzanne

Comments

  • Anonymous
    May 17, 2012
    Wow, that's actually pretty useful! I was hoping to find some way to add a customizable "field" to the quick access toolbar or ribbon, to be able to display the current column width in realtime (like the font or font color is displayed as soon as you click in a cell)... With this at least I can put the formula into a cell or VBA function or control and get the property that way. Thanks for posting that.