PARSEFRACTION function
TextualFraction
The text string containing a fraction.
Returns
The number found in the given text string.
Interprets a text string as a number and returns it, where the text string is expected to contain a fraction (a denominator, a division symbol and a numerator), optionally preceded by an integer. PARSEFRACTION("3 3/4")PARSEFRACTION("3 3/4") returns 3.75.
PARSEFRACTION takes the language of the app into account when converting text strings to numbers. When PARSEFRACTION is used with an app whose language is set to German, for instance, text strings representing numbers should use a comma (",") as a decimal separator. When PARSEFRACTION is used with an app whose language is set to UK English, a decimal point (".") should be used. Language-appropriate thousands separators may be used.
This function is very flexible in terms of what input it can parse. For instance, PARSEFRACTION("003,500 4/8 lbs")PARSEFRACTION("003,500 4/8 lbs") returns 3500.5.
This function is specific to Calcapp.
Related functions
- Use FORMATFRACTION to create text strings that can be interpreted by this function.
- Use PARSENUMBER to parse a regular number (like "18.4").
- Use PARSEPERCENTAGE to parse a percentage (like "75%").
- Use PARSESCIENTIFIC to parse numbers using scientific notation (like "1.5E+03").
- Use TONUMBER to convert text strings to numbers if you only need a limited feature set.
Examples
Returns 3.75.
Returns the array { 3.75, 0.1875 }{ 3,75; 0,1875 }.
Returns 3500.5.