Welcome back to our regular blog of Excel functions from A to Z. Today we look at the CONVERT function.
The CONVERT function
Are you a CONVERTED? this function converts a number from one measurement system to another. For instance, CONVERT you can translate a distance table in miles to a table of distances in kilometers.
The CONVERT The function uses the following syntax to operate:
CONVERT (number, desde_unidad, a_unidad)
The CONVERT The function has the following arguments:
- number: this is the value in from_units to convert
- from_unit: this represents the units for number
- to_unit: is are the units of the result. CONVERT accepts the following text values (in quotes) to from_unit Y to_unit.
We often encounter financial models and spreadsheets falling apart due to the significant prevalence of hard code.. A common reason is because analysts convert data from one measure or unit to another. (p.ej from kilograms to parsecs, or something like that!!).
Some modelers will go the extra mile (pun) by having a reference section where conversion factors are stored and referenced, p.ej
The problem with this approach is that the numbers can be transposed., typing or expressing yourself backwards (p.ej. a common conversion error we found was tons by a ton). These numbers are constants, and there is another way.
If you are not already familiar with this feature, let us introduce you to the CONVERT function:
= CONVERT (number, desde_unidad, a_unidad)
From Excel 2007 and the advent of Formula Autocomplete, this function has really become a reality. For instance, to generate / confirm the first conversion factor, just use 1,000 for the number and locate “metre”. (sic)
Later, after selecting the drive 'de’ Appropriate, the list for the third argument will be automatically filtered by significant conversion units (for instance, “kg” will not appear):
The only criticism we have is that the units don't seem to be in any logical order. (for instance, alphabetic), but, unlike U2, you can usually find what you're looking for.
Here is the full list of “Disciples” (namely “Converted” – You understand?):
It should also be noted that:
- if the input data types are incorrect, CONVERT return the #VALUE! error value
- if the drive does not exist, CONVERT return the #N / A error value
- if the drive does not support a binary prefix, CONVERT return the #N / A error value
- if the units are in different groups, CONVERT return the #N / A error value
- unit names and prefixes are case sensitive.
Please, see my example below:
Soon we will continue with our functions from A to Z of Excel. Keep checking: there is a new blog post every other business day.
You can find a full page of feature articles here.