Calc CONVERT function

Converts a number from one measurement system to another.

Help CentreFunctions & Formulas

For a full list of available calculation functions, please read What calculation functions are supported.

This article describes the formula syntax and usage of the CONVERT function and is applicable to both the RPA and Cloud Automate's calculate functions.

Description

Converts a number from one measurement system to another. For example, CONVERT can translate a table of distances in miles to a table of distances in kilometers.


Syntax

CONVERT(number, from_unit, to_unit)

The CONVERT function syntax has the following arguments:

  • number - Required. The value in from_units to convert.
  • from_unit - Required: The units for number.
  • to_unit - Required: The units for the result.

Units of measure

CONVERT accepts the following text values for from_unit and to_unit:

  • Distance: mm (millimeters), cm (centimeters), m (meters), km (kilometers), in (inch), ft (feet), yd (yards), mi (miles)
  • Weight and mass: g (grams), kg (kilograms), t (tonnes), lb (pounds), oz (ounces)

Remarks

  • If the input data types are incorrect, CONVERT returns the None value.
  • If the unit does not exist, CONVERT returns the None value.
  • If the unit does not support a binary prefix, CONVERT returns the None value.
  • If the units are in different groups, CONVERT returns the None value.
  • Unit names and prefixes are case-sensitive.

Example

FormulaDescriptionResult
=CONVERT(1, "lbm", "kg")Converts 1 pound mass to kilograms.0.4535924
=CONVERT(68, "F", "C")Converts 68 degrees Fahrenheit to Celsius.20
=CONVERT(2.5, "ft", "kg")Data types are not the same, so an error is returned.None
=CONVERT(100, "ft", "m")Converts 100 square feet into square meters.9.290304

Errors

For a full list of formula errors, please read Formula errors.


Related functions

See it working on your own data

Everything documented here ships with the platform – try the document tools free, or go live in 7 days.