Converts a text string that represents a number to a number.
Syntax
VALUE(text)
Text is the text enclosed in quotation marks or a reference to a cell containing the text you want to convert.
Remarks
-
Text can be in any of the constant number, date, or time formats recognized by the spreadsheet. If text is not in one of these formats, VALUE returns the #VALUE! error value.
-
You do not generally need to use the VALUE function in a formula because text is automatically converted to numbers as necessary. This function is provided for compatibility with other spreadsheet programs.
Example
The example may be easier to understand if you copy it to a blank spreadsheet.
- Create a blank spreadsheet.
- Select the example in the Help topic.
Selecting an example from Help
- Press CTRL+C.
- In the spreadsheet, select cell A1, and press CTRL+V.
- To switch between viewing the formula that returns the result and the result in the cell, select the cell and press F2 and then ENTER, or click Commands and Options on the spreadsheet toolbar, click the Formula tab, and look in the Formula in active cell (active cell) box.
Formula | Description (Result) |
---|---|
=VALUE("$1,000") | Number equivalent of the string (1000) |
=VALUE("16:48:00")-VALUE("12:00:00") | The serial number equivalent to 4 hours and 48 minutes, which is "16:48:00"-"12:00:00" (0.2 or 4:48) |