Applies To
Excel for Microsoft 365 Excel for Microsoft 365 for Mac Excel for the web

The CELL function can obtain basic information about a cell. For example:

=CELL("color",A1) will determine if A1 is formatted to display red text because of negative values. However, it cannot determine other colors like cell highlight colors. That requires VBA.    

=CELL("type",A1) will determine the type of data in A1. The formula will return "b" if it's blank, "l" for label if it contains a text constant, or "v" for value if the cell contains anything else.

For more info, see CELL function.

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.