I finished Googling unit conversions—Excel’s CONVERT operate does the work for me


For a single unit conversion, Google wins on comfort. But when I’ve a bunch of measurements to transform, I do not desire a scrap of paper lined in random numbers, or to maintain copying values out of a spreadsheet and again once more. Excel’s CONVERT operate lets me maintain the measurements, items, and outcomes collectively, whereas reusing the identical components for as many conversions as I would like.

CONVERT turns repetitive conversions right into a spreadsheet process

Maintain measurements and outcomes collectively

An Excel table showing unit conversions with Description, Measurement, From, To, and Result columns.

The setup I take advantage of is intentionally easy. I give every measurement its personal row, file the unit it at the moment makes use of, enter the unit I need, and let Excel calculate the consequence.

Now I’ve the unique measurement and its transformed worth collectively, with sufficient data to see precisely what every quantity means. If I would like to vary a conversion, I can change the items as an alternative of beginning over elsewhere.

This works simply as effectively for a handful of unrelated measurements because it does for a bigger dataset. If I’ve imported distances in miles and want them in kilometers, for instance, I can add a conversion column and maintain the outcomes alongside the unique knowledge.

CONVERT wants solely three arguments

A tiny components goes a great distance

The CONVERT syntax is simple to comply with and bear in mind:

=CONVERT(quantity,from_unit,to_unit)

The primary argument is the quantity I need to convert, the second is the unit it is at the moment in, and the third is the unit I need the end in.

In its easiest type, I may write:

=CONVERT(36,"in","cm")

This returns 91.44, as a result of 36 inches is 91.44 centimeters.

Likewise:

=CONVERT(5,"mi","km")

Excel calculates 8.04672.

The variety of decimal locations Excel shows can depend upon the column width and the cell’s quantity format. A slender column could present fewer decimal locations, whereas altering the quantity format enables you to management what number of decimal locations are displayed.

CONVERT additionally handles conversions the place a easy multiplication is not sufficient. For instance, changing Fahrenheit to Celsius entails each a change in scale and an offset, however I needn’t account for both manually:

=CONVERT(68,"F","C")

returns 20.

In different phrases, I needn’t know the underlying conversion components. I simply give CONVERT the quantity and the 2 unit codes, and Excel handles the calculation.

The one factor that takes somewhat getting used to is that CONVERT makes use of unit codes slightly than full unit names. So I would like in slightly than “inches,” cm slightly than “centimeters,” and mi slightly than “miles.” Microsoft gives a listing of all of the codes CONVERT accepts, so I can search for an unfamiliar code after I want it, then enter it straight into the From and To columns of my desk.

An Excel desk makes CONVERT reusable

Change the items, not the components

Arduous-coding the quantity, from_unit, and to_unit arguments works simply wonderful. However after I put the measurements and unit codes in their very own columns, I could make the vary an Excel desk and use the identical components for each row, even when the items change:

=CONVERT([@Measurement],[@From],[@To])

For readability and consistency, format the Outcome column to indicate two decimal locations, so the transformed values do not find yourself with an extended string of digits.

The structured references inform Excel to make use of the values from the present row. As a result of it is an Excel desk, the components additionally fills down mechanically after I add one other measurement.

I may depart the components there, however I favor so as to add a easy error message utilizing IFERROR:

=IFERROR(CONVERT([@Measurement],[@From],[@To]),"Enter legitimate items")

Now a typo or incompatible pair of items produces a helpful message as an alternative of an Excel error. For instance, if I by accident kind mii as an alternative of mi, or attempt to convert mi to C, the consequence shows “Enter legitimate items.”

The actually helpful half is that I can change the items with out touching the components. If I modify mi to km and km to mi, Excel converts the measurement in the wrong way. If I modify in to ft and cm to m, the identical components handles that conversion too.

I also can add as many rows as I would like, so I can deal with a number of measurements directly. And since the conversions keep within the desk, I’ve a file of what I’ve transformed and the outcomes I bought, slightly than a group of measurements scribbled on scraps of paper.

Issues to notice with the CONVERT operate

Get extra from CONVERT

Excel table using IFERROR and CONVERT formulas to show unit conversions with abbreviated metric prefixes.

One helpful characteristic is that CONVERT helps prefixes, resembling kilo-, centi-, milli-, and micro-, for metric items, in addition to binary prefixes for data items. Within the screenshot above, the okay in kPa tells Excel that the measurement is in kilopascals, whereas the okay in km/h equally signifies kilometers per hour. The M and okay in Mbit and kbit point out totally different multiples of the bit. This implies I can convert between totally different multiples of a unit with out making a separate components for every one.

There are additionally a few operate guidelines price remembering. First, unit codes are case-sensitive. For instance, Celsius makes use of C, whereas c refers to a thermodynamic calorie. Second, for those who hard-code the unit codes into the components, that you must put them in double quotes. Once you’re referencing cells or structured references, although, you do not want quotes.

Do not overlook the small however helpful features

CONVERT is a type of missed Excel features that may be surprisingly helpful in on a regular basis conditions. Capabilities like XLOOKUP and PIVOTBY are likely to get rather more consideration, however I maintain discovering that a few of Excel’s much less talked-about features remedy the small issues that crop up in actual spreadsheets.

أضف تعليق