Excel for Microsoft 365 Excel for Microsoft 365 for Mac Excel for the web Excel 2021 Excel 2021 for Mac Excel 2019 Excel 2019 for Mac Excel 2016 Excel 2016 for Mac Excel 2013 Excel for iPad Excel for iPhone Excel for Android tablets Excel 2010 Excel 2007 Excel for Mac 2011 Excel for Android phones Excel Starter 2010 More...Less The CELL function returns information about the formatting, location, or contents of a cell. For example, if you want to verify that a cell contains a numeric value instead of text before you perform a calculation on it, you can use the following formula: =IF(CELL("type",A1)="v",A1*2,0) This formula calculates A1*2 only if cell A1 contains a numeric value, and returns 0 if A1 contains text or is blank.
Note: Formulas that use CELL have language-specific argument values and will return errors if calculated using a different language version of Excel. For example, if you create a formula containing CELL while using the Czech version of Excel, that formula will return an error if the workbook is opened using the French version. If it is important for others to open your workbook using different language versions of Excel, consider either using alternative functions or allowing others to save local copies in which they revise the CELL arguments to match their language. CELL(info_type, [reference]) The CELL function syntax has the following arguments:
The following list describes the text values that can be used for the info_type argument. These values must be entered in the CELL function with quotes (" ").
The following list describes the text values that the CELL function returns when the Info_type argument is "format" and the reference argument is a cell that is formatted with a built-in number format.
Note: If the info_type argument in the CELL function is "format" and you later apply a different format to the referenced cell, you must recalculate the worksheet (press F9) to update the results of the CELL function.
You can always ask an expert in the Excel Tech Community or get support in the Answers community. Change the format of a cell |