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.
The CELL function can obtain basic information about a cell. For more info, see CELL function.
=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.
In Excel for the web, the info_type (first parameter) has limited support. You can, however, use the full Cell function types in the Excel desktop app.
-
To open the desktop app, at the top of the ribbon, select Editing > Open in Desktop App.
Don't have the Excel desktop app? Try or buy Microsoft 365.