
If you frequently work with data in Excel, sooner or later you'll encounter the need to quickly and reliably convert units of measurement : from kilometers to meters, from miles to kilometers, from liters to gallons, from Fahrenheit to Celsius, and so on. Doing it manually with custom formulas ends up being a hassle, especially when you're dealing with thousands of records.
For these situations, there's a specific function, CONVERT, that lets you transform a numerical value from one measurement system to another without having to remember conversion factors or create complex formulas. And, since we're talking about Excel and productivity, you'll also likely want to export that data to PDF afterward to share reports, invoices, or tables in a professional format that won't get messed up on other computers, or convert CSV files to Excel to integrate them into your spreadsheets.
What is the CONVERT function in Excel and what is it used for?
The CONVERT function belongs to Excel's engineering functions category and is specifically designed to change a number from one unit to another within the same type of quantity (length, weight, temperature, volume, etc.). That is, you can convert from meters to kilometers, from pounds to kilograms, or from Celsius to Fahrenheit, but not from meters to seconds because that would mix incompatible unit types.
Its main purpose is to help you automate unit conversions that you would otherwise have to perform manually (for example, multiplying kilometers by 1.000 to obtain meters). This way, you avoid errors, save time, and ensure consistency across all spreadsheets where you need to standardize measurement systems.
Excel CONVERT syntax
The general structure of the function in the Spanish version of Excel is:
CONVERT(number; from_unit; to_unit)
Where each argument means the following:
- numerousThis is the numerical value you want to transform. It can be a number written directly (for example, 95) or a cell reference (for example, D4).
- of_unit: a text string in quotation marks that indicates the starting unit of the number, such as "km", "m", "lbm", "C", etc.
- a_unit: a string of text in quotation marks that marks the final unit you want to convert to, for example "m", "kg", "F", "l", etc.
It is important that the units are written exactly as Excel recognizes them , respecting uppercase and lowercase letters where appropriate, because the function distinguishes between the two in some cases.
Practical example: converting kilometers to meters
Imagine the scenario of an electric bicycle company (like Ecobike) that records its customers' rides in kilometers using devices integrated into the bikes. For certain internal reports, they need that data in meters.
Suppose you have a table with three columns: customer name, distance traveled in kilometers, and a third empty column for distance in meters. In one of the rows, for example, customer Pedro has the value 95 (kilometers) in cell D4.
To convert those 95 km to meters, in cell E4 you would write:
=CONVERT(D4; "km"; "m")
In this case, the number argument is D4, the unit of distance is "km", and the unit of distance is "m". The function's result will be 95.000, so it would look something like "Customer Pedro; 95 km; 95.000 m". Then, you would just need to drag the formula from E4 down (for example, to E11) to automatically convert all the remaining records.
Arguments and behavior of the function
For CONVERT to work correctly, you must ensure that each argument meets certain minimum conditions :
- The number argument must actually be a numeric value; if you try to use non-convertible text, you will encounter an error.
- unit_number and unit_number must be valid units for Excel and belong to the same type of magnitude (for example, both length, both mass, both temperature, etc.).
- The units are written in quotation marks and, in many cases, respect international conventions or typical abbreviations ("m" for meter, "mi" for mile, "C" for Celsius, "F" for Fahrenheit, and so on).
The function internally uses standardized unit equivalence tables , so you can trust the result as long as you have properly specified the text strings and do not mix unit types.
Units that CONVERT supports: listed by categories
The CONVERT function accepts a wide range of units organized into groups. Below is a detailed overview of the most relevant ones, following the logic used by Excel.
Weight and mass
In the weight and mass group , you can work with the following units, always using their codes as they appear in quotation marks:
- Gram: «g»
- Slug: «sg»
- Pound mass (avoirdupois system): «lbm»
- Atomic mass unit: "u"
- Ounce (avoirdupois system): "ozm"
- Grain: «grain»
- Short US quintal: "cwt" or "shweight"
- British quintal: «uk_cwt» or «lcwt» (also «hweight»)
- Stone: «stone»
- Ton (ton): «t»
- British ton: «uk_ton» or «LTON» (also «brton»)
With these strings you can, for example, convert from pounds to kilograms by combining "lbm" with "kg" using the metric prefix system, as you will see a little later.
Distance
To work with lengths and distances , Excel supports multiple units:
- Subway: «m»
- Milla: "my"
- Nautical mile: «Nmi»
- Inch: "in" (in the original text it appears as "pda", but in English Excel it uses "in"; in Spanish, the documentation may show localized abbreviations, it is advisable to check in your version)
- Footnote: «ft»
- Yard: «yd»
- Angstrom: «ang»
- Ell: «ell»
- Light-year: "ly" or "al" depending on local documentation
- Parsec: "parsec" or "pc"
- Typographic Pica (1/72 of an inch): «Picapt» or «Pica»
- 1/6 inch pick: "pick"
- US survey mile (land mile): «survey_mi» or «survey_mi» in some translations
Thanks to this set, it is very easy to generate, for example, a table of equivalencies between miles and kilometers with a single formula dragged across an entire column.
Time
If you need to perform time unit conversions , you're also covered:
- Year: "yr" or "year" depending on local documentation
- Day: "day" or "d"
- Time: «hr»
- Minute: «mn» or «min»
- Second: «sec» or «s»
This is great when you want to express durations in seconds, for example, but you have the data in hours, or vice versa, without having to remember that 1 hour is 3.600 seconds because the function itself does that conversion.
Pressure
In the area of pressure , the main options are:
- Pascal: «Pa» (or «p»)
- Atmosphere: "atm" (or "at")
- Millimeter of mercury: "mmHg"
- PSI (pounds per square inch): "psi"
- Torr: «Torr»
These units are very useful in engineering, meteorology or physics contexts where different pressure scales are routinely used.
Force
For force magnitudes , Excel includes:
- Newton: «N»
- Dina: «dyn» or «din»
- Pound force: "lbf"
By combining these labels you can easily change, for example, from Newtons to pounds force when you need to adapt reports to regulations or documentation in different systems.
Energy
In the energy section , the supported units include:
- Julio: «J»
- Ergio: «e»
- Calorie (4,183991 J): «c»
- Standard calorie (4,186795 J): «cal»
- Electronvolt: "eV" or "ev"
- Horsepower per hour: "hph", "CVh" or "ch" depending on the documentation
- Watt-hour: "Wh" or "wh"
- Pound foot (work): «flb»
- BTU (British Thermal Unit): "BTU" or "btu"
Thanks to these codes, you can prepare energy comparisons between different measurement systems without overthinking conversion factors.
Power
The power category is shorter, but covers typical cases:
- Horsepower: "HP" or "CV" (in Spanish documentation)
- Watt: "W" or "w"
With these labels, for example, you can go from the classic horsepower of an engine to watts to unify criteria in a technical report.
Magnetism
For magnetic fields , Excel recognizes:
- Tesla: "T"
- Gauss: «ga»
It is usually a more specialized category, but it is convenient if you work with magnetic field measurements that come in different units.
Temperature
Temperature conversion is one of the most common uses of CONVERT. The available units are:
- Degree Celsius: "C" or "cel"
- Fahrenheit Degree: "F" or "fah"
- Kelvin: "K" or "kel"
- Rankine Rank: «Rank»
- Réaumur Grade: «Reau»
Thanks to this, you can effortlessly convert, for example, 68°F to degrees Celsius with a formula like =CONVERT(68; "F"; "C") , getting 20 as a result.
Volume
In the volume or liquid measurement category , Excel supports many common units:
- Teaspoon: "tsp" or "cuchita" depending on the translation
- Modern teaspoon: "tspm" or "cuchitam"
- Tablespoon: "tbsp" or "tbsp"
- Fluid ounce: «oz»
- Cup: "cup"
- US pint: "pt" or "us_pt"
- Pint of the United Kingdom: «uk_pt»
- Standard quart: "qt"
- British fourth: «uk_qt»
- Gallon: «gal»
- British gal: «uk_gal»
- Liter: «l» or «lt»
- Cubic angstrom: "ang3" or "ang^3"
- American oil barrel: "barrel"
- American bushel: "bushel" or "fanega"
- Cubic foot: "ft3" or "ft^3"
- Cubic inch: «in3» or «in^3» (in some documentation translated as «pda3»)
- Cubic light-year: "ly3" or "al3"
- Cubic meter: «m3» or «m^3»
- Cubic mile: «mi3» or «mi^3»
- Cubic nautical mile: «Nmi3» or «Nmi^3»
- Cubic pica: «Picapt3», «Picapt^3», «Pica3» or «Pica^3»
- Gross register ton: “GRT” or “regton”
- Tonnage or freight tonnage: "MTON"
With these units you can cover everything from cooking recipes converted to metric units to more technical calculations of industrial volumes.
Area
For surfaces or areas , the support includes:
- Acre international: «uk_acre»
- US acre: «us_acre»
- Square Angstrom: "ang2" or "ang^2"
- Ara: «ar»
- Square foot: "ft2" or "ft^2"
- Hectare: «ha»
- Square inch: "in2" or "in^2"
- Square light-year: "ly2" or "al2"
- Square meter: «m2» or «m^2»
- Morgen: «Morgen»
- Square mile: "mi2" or "mi^2"
- Square nautical mile: «Nmi2» or «Nmi^2»
- Square Pica: «Picapt2», «Pica2», «Pica^2» or «Picapt^2»
- Square yard: "yd2" or "yd^2"
You will find it especially useful for surface reports in agriculture, construction, surveying, etc.
Information (data size)
Within the digital world, the category of information is very simple but essential:
- Bit: "bit"
- Byte: «byte»
By combining these units with certain prefixes, you can easily see, for example, how many bits are in a given number of bytes or vice versa.
Speed
Finally, in the speed category you have:
- Geographic mile or admiralty knot: admkn
- Knot: «kn»
- Meters per hour: "m/h" or "m/hr"
- Meters per second: "m/s" or "m/sec"
- Miles per hour: "mph"
All of this is key when you want to unify speeds in logistics or transport reports that mix knots, km/hym/s.
Metric and binary prefixes supported by CONVERTIR
One of the great advantages of this feature is that you can add metric prefixes to base metric units to create larger or smaller scales without having to manually remember the factors. These prefixes multiply the unit by a specific factor:
- yotta (1E+24): «And»
- zetta (1E+21): «Z»
- exa (1E+18): «E»
- peta (1E+15): «P»
- tera (1E+12): «T»
- giga (1E+09): «G»
- mega (1E+06): «M»
- kilo (1E+03): «k»
- hecto (1E+02): «h»
- deca (1E+01): «da» (in some documentation also «e»)
- deci (1E-01): «d»
- centi (1E-02): «c»
- mili (1E-03): «m»
- micro (1E-06): «u»
- nano (1E-09): «n»
- peak (1E-12): «p»
- femto (1E-15): «f»
- atto (1E-18): «a»
- zepto (1E-21): «z»
- yocto (1E-24): "and"
This means you can write "km" for kilometers, "mm" for millimeters , "mg" for milligrams, "GB" for gigabytes (in the context of information, if you combine giga with byte), etc.
In addition, for data sizes in computing, Excel also recognizes binary prefixes , typically used in memory and storage:
- yobi (2^80): «Yi»
- zebi (2^70): «Zi»
- exbi (2^60): «Ei»
- pebi (2^50): «Pi»
- tebi (2^40): «Ti»
- gibi (2^30): «Gi»
- mebi (2^20): «My»
- kibi (2^10 = 1024): «Ki»
These prefixes are useful for differentiating, for example, decimal gigabytes from binary gibibytes in advanced technical contexts.
Common errors in the CONVERT function and how to interpret them
When using CONVERT, it's quite common to encounter specific errors when something doesn't fit . The main ones are:
- #WORTH!This error appears when the input data type is incorrect. For example, if the number argument contains text that cannot be interpreted as a number.
- #AT: is returned in several cases: when the unit does not exist, when it does not recognize a prefix, or when the units you have indicated belong to different and incompatible groups (for example, trying to convert from meters to seconds).
In addition, you should keep in mind that uppercase and lowercase letters matter in many units and prefixes. That is, "m" and "M" do not mean the same thing (milli vs. mega, for example), so you have to type carefully.
Useful examples of formulas with CONVERT
To give you an idea of the function in context, here are several typical examples based on its real-world use:
- =CONVERT(1; "lbm"; "kg"): transforms 1 pound mass into kilograms and returns approximately 0,4535924.
- =CONVERT(68; "F"; "C"): converts 68 degrees Fahrenheit to Celsius and the result is 20.
- =CONVERT(2,5; «ft»; «s»): here incompatible units are mixed (length with time), so it returns #AT.
- =CONVERT(CONVERT(100; «ft»; «m»); «ft»; «m»)This chained example illustrates how to apply multiple conversions, although the original text seems to refer to square feet; in practice, you can nest functions for first transform to an intermediate unit and then to another.
You can also copy sample tables into your sheet (like the classic one with a value of 6 in A1 and different CONVERT formulas in subsequent rows) to test unit combinations and see the results directly in your version of Excel.
Excel as a comprehensive tool for data analysis
The CONVERT function is just one piece within the Excel ecosystem, a tool designed to organize, calculate, and visualize data in a simple yet incredibly powerful way. Since its introduction in 1985, it has become a standard in sectors such as finance, marketing, human resources, logistics, and business intelligence (BI).
Excel is based on a workbook made up of worksheets, and each worksheet is composed of cells organized into rows and columns . Columns are represented by letters (A, B, C…) and rows by numbers (1, 2, 3…). Each cell is identified by its column and row combination (A1, B2, C3, etc.) and can contain text, numbers, formulas, or functions.
In addition to the cells, the interface includes key elements such as the options bar (or ribbon) , where most of the tools are grouped (cell formatting, inserting elements, page layout, formulas, sorting, filters, etc.), the formula bar , where the editable content of the active cell appears, and the lower area with the sheet names, view modes, and zoom control.
Tables, basic formulas, and essential functions
One of the most commonly used structures in Excel is the data table . In a table, each column typically has a header that describes its content (for example, Salesperson, Product, Quantity Sold, Unit Price, Discount, Total Amount, etc.) and each row represents a specific record or transaction.
It is on these tables that it makes sense to apply functions like CONVERT, but also a multitude of basic functions for analysis that are part of everyday use in Excel:
- SUMThis function allows you to sum values from a range or individual cells. It is used as =SUM(A1,B1,C1) to sum specific cells or =SUM(A1:A5) to sum a continuous range.
- AVERAGE: calculates the arithmetic mean of a set of numbers. For example, =AVERAGE(C2:C13) will give you the average of the Quantity Sold column.
- SI: evaluates a logical condition and returns one value if it is met and another if it is not. For example, =IF(K2>25000; "Yes"; "No") could indicate whether total sales exceed a threshold.
- YES SET: extends the IF function to evaluate multiple conditions in a chain, returning the value corresponding to the first true condition. Very useful for classifications such as "Low", "Medium", or "High" based on the value of a cell.
- TELL: counts how many cells in a range contain numbers, ideal for checking the integrity of numerical data.
- COUNT YES: counts how many cells meet a specific criterion, for example, how many sales a specific salesperson made.
- ADD IF: sum of values that meet a given criterion, such as the sum of the total amount sold by a specific seller.
By combining these functions with formatting tools, filters, pivot tables, and charts, you can transform data into clear and visual reports very quickly.
Creating charts from data in Excel
Charts are another fundamental tool for interpreting data at a glance . For example, if you have a sales table by product, with columns for Product and Quantity Sold, you would simply select that range, go to the Insert tab, and choose a clustered column chart from the Recommended Charts option.
Once the chart is inserted, you can adjust details such as the Y-axis range (to start at 0, for example, and accurately represent the differences between products), legends, titles, and colors. These types of adjustments help to clearly visualize discrepancies in the data without having to review the original table row by row.
Export Excel to PDF without losing formatting
Once you have your data well organized, with formulas like CONVERT applied and charts set up, you'll often need to send the results in PDF format . Doing it incorrectly leads to classic problems: the page gets cut off, headers disappear on subsequent pages, charts become misaligned, or the document is scattered chaotically across multiple pages.
To avoid these errors, it's helpful to know the three main ways to convert from Excel to PDF and the key adjustments required beforehand:
Method 1: Save as PDF
This is usually the simplest method. It involves going to File → Save As, choosing the location, and selecting PDF as the file type . Before clicking Save, it's advisable to go to Options to define whether to export only the active sheet, the entire workbook, a specific range, or a set of pages, as well as whether or not to preserve the configured print areas.
Method 2: Export to PDF
In modern versions of Excel, there's also a specific option under File → Export called Create PDF/XPS Document . The process is very similar to the previous method: you select this option, click Create PDF/XPS, adjust the settings, and save the file. Again, the important thing is to clearly define which part of the workbook you want to export.
Method 3: Print to PDF
Another widely used method is to print to PDF . From File → Print (or with Ctrl+P), select "Microsoft Print to PDF" as your printer on Windows or "Save as PDF" on Mac. Then configure the orientation, paper size, margins, and print range. This is especially useful because you can preview the print job before generating the file , allowing you to quickly detect any cut-off or misaligned sections.
Five key settings for a perfect PDF
Beyond the chosen method, the final result depends primarily on a few preliminary adjustments to the page design . These are the most important:
1. Set the print area
Select the exact cells you want to include in the PDF and go to the Page Layout tab → Print Area → Set Print Area. This way, Excel will only print (and therefore export) the relevant area, without any extra columns or empty spaces cluttering the document.
2. Choose the appropriate orientation
In Page Layout → Orientation, you can switch between Portrait and Landscape. For very wide tables with many columns, landscape orientation is usually preferable to avoid columns being cut off or the text appearing in tiny sizes.
3. Fit to page
One of the most effective tricks is to use the scaling options: in Page Layout, you can specify that the width should fit 1 page and leave the height on automatic. This way, all the columns fit on a single page width , even if the table spans several pages in height. If you want everything to fit on a single page, you can also force both width and height to 1, although you run the risk of the content appearing too small.
4. Define manual page breaks
If you want to precisely control where each page breaks, go to View → Page Break Preview. There you'll see blue lines that you can drag to manually mark the breaks . This is very useful when you want each section or block of your report to start on a new page.
5. Repeat headers on all pages
In long tables, it's crucial that the header row appears on every page. To do this, go to Page Layout → Print Titles, and in the Repeat Rows at Top section, select the header row (for example, row 1). This ensures that every page of the PDF keeps the column names visible.
Protection and size of the generated PDF
Although Excel doesn't allow you to password-protect the PDF directly when exporting, there are a couple of strategies you can use to protect the content:
- Encrypt the original Excel workbook from File → Info → Encrypt with password, so that only someone who knows the password can open the source file.
- Apply a password to the PDF using external tools, such as Adobe Acrobat or online services, once you have generated it from Excel.
Regarding file size, in the PDF export dialog box you can select whether you want standard quality (intended for professional printing and distribution ) or a minimum size optimized for online publishing, which generates lighter PDFs at the expense of some image quality.
Common mistakes when converting Excel to PDF
As with the CONVERT function, there are also typical errors that are repeated when exporting to PDF and that should be kept in mind:
- Not checking the print preview before saving, which results in cut columns or absurd page breaks.
- Forgetting to define a print area, so Excel includes auxiliary data or empty rows and columns.
- Using an inappropriate paper size (e.g., Letter instead of A4), which disrupts the entire layout.
- Do not configure header repetition in long tables, making reading difficult from the second page onwards.
- Exporting the entire book when you only need a specific sheet results in unnecessarily long and confusing documents.
- Do not check the position and size of the graphics and images, which may be cropped if they are not properly adjusted to the usable area.
Spending a couple of minutes checking these points before exporting makes all the difference between a sloppy PDF and one that looks truly professional.
Mastering the CONVERT function to unify units of measurement, combining it with basic functions like SUM, AVERAGE, or IF on well-structured tables, and finishing the job with a clean and well-formatted PDF export allows you to transform your Excel spreadsheets into solid, understandable, and shareable reports without formatting surprises, which ultimately saves time, avoids errors, and improves the image of any report you produce.
Table of Contents
- 1 What is the CONVERT function in Excel and what is it used for?
- 2 Excel CONVERT syntax
- 3 Practical example: converting kilometers to meters
- 4 Arguments and behavior of the function
- 5 Units that CONVERT supports: listed by categories
- 6 Metric and binary prefixes supported by CONVERTIR
- 7 Common errors in the CONVERT function and how to interpret them
- 8 Useful examples of formulas with CONVERT
- 9 Excel as a comprehensive tool for data analysis
- 10 Tables, basic formulas, and essential functions
- 11 Creating charts from data in Excel
- 12 Export Excel to PDF without losing formatting
- 13 Five key settings for a perfect PDF
- 14 Protection and size of the generated PDF
- 15 Common mistakes when converting Excel to PDF