Excel stores values as either text or numeric values, so, for example, if you attempt to use the text value "10" in an addition, multiplication, or other numeric operation, you will get an error.
Therefore, if you want to extract a numeric value from a text string, you need to convert this to a number, before Excel will be able to recognise it as a numeric value. The Numbervalue function can be used to do this.
The Excel Numbervalue function converts a text string into a number, in a locale-independant way.
Note: The Numbervalue function is new in Excel 2013 and so is not available in earlier versions of Excel.
The syntax of the function is:
where the function arguments are:
text | - | The text string that you want to convert to a number. |
[decimal_separator] | - |
An optional argument specifying the character that separates the integer part from the decimal part of the supplied number. If [decimal_separator] is omitted, the separator from the current locale is used. |
[group_separator] | - |
An optional argument specifying the character that separates groups (e.g. thousands, millions, etc.). If [group_separator] is omitted, the separator from the current locale is used. |
The following spreadsheet shows examples of the Excel Numbervalue function, used to convert different text strings to numbers.
Formulas:
|
Results:
|
If the % character is used in the supplied text argument, this is treated as a percentage (i.e. the number is divided by 100).
Multiple % characters cause the numeric part of the text argument to be divided multiple times.
This is shown in the examples below.
Formulas:
|
Results:
|
For further details and examples of the Excel Numbervalue function, see the Microsoft Office website.
If you get an error from the Excel Numbervalue function this is likely to be the #VALUE! error:
#VALUE! | - |
Occurs if either:
|