Add M to a Number in Excel: Formula and Formatting

Formulas & functions · Updated November 19, 2026

To add an M after a number in Excel, apply a custom number format such as #,##0"M" to keep the value numeric, or join the number and letter with a formula such as =A2&"M" to create text. If M is meant to indicate millions, use a format with two scaling commas, such as 0.0,,"M", which displays a number in millions without changing its stored value.

What adding M can mean

People usually mean one of two different things when they ask how to add M to a number. They may want a literal letter after the number, so that 250 appears as 250M, or they may want a compact millions display, so that 1,250,000 appears as 1.3M. Those results look similar but involve different number formats.

There is also an important difference between changing what Excel displays and changing the underlying value. A number format changes only the appearance of a numeric cell: formulas can still calculate with it. A concatenation formula joins text to a value and returns text, which can affect calculations, sorting, and charting. Choose the method based on what you need to do with the result, not just how it should look.

Append M while keeping the value numeric

For a simple suffix, a custom number format is usually the best choice. It tells Excel to show the letter M as a literal character while retaining the cell’s original numeric value. For example, a value of 250 can appear as 250M, while a formula that adds the cell to another number still uses 250.

  1. Select the cells you want to change.
  2. In Excel for Microsoft 365 on Windows, press Ctrl+1 to open Format Cells. On a Mac, press Command+1.
  3. Choose the Number tab, then select Custom.
  4. Enter #,##0"M" in the Type box and select OK.

The commas in this format group thousands; they do not scale the value. For instance, with 250 in A2, the cell displays 250M. To show decimal places, use a format such as #,##0.0"M"; 250.5 then displays as 250.5M. If you do not want a thousands separator, use 0"M" instead.

In a custom number format, quotation marks make M a literal character rather than a formatting instruction. You can use a lowercase suffix by entering 0"m". The letter is for display; Excel does not interpret it as a mathematical unit or convert the underlying number.

Display a number in millions

If M means million, use two commas at the end of the numeric part of a custom format. Each trailing scaling comma divides the displayed number by 1,000, so two divide it by 1,000,000. The stored number stays unchanged. To show one decimal place followed by M, enter 0.0,,"M" in the Custom Type box.

For example, a stored value of 1,250,000 displays as 1.3M with that format. Excel rounds the displayed result to one decimal place; it does not replace 1,250,000 with 1.3. A value of 8,400,000 displays as 8.4M, while 8,000,000 displays as 8.0M. For whole millions, use #,##0,,"M": 1,250,000 appears as 1M because the display has no decimal places.

To set this up, select the cells, open Format Cells with Ctrl+1 on Windows or Command+1 on Mac, and select Number > Custom. Type the format you want, such as 0.0,,"M", then confirm. When a workbook already has a custom format, Excel for the web may display it, but desktop Excel is a reliable place to create or edit custom formats if the browser interface does not offer the needed option.

Be aware that a compact display can hide useful detail. Two different values may round to the same visible result, and a reader may mistake a rounded figure for an exact one. Keep the full value accessible in the formula bar, use enough decimal places for the task, or label the column clearly—for example, “Revenue (millions)”—when the scale matters.

Use a formula when the result must contain text

A formula is appropriate when you need a text label such as 250M to export, combine with other text, or show in a separate reporting cell. Assuming A2 contains the number 250, enter =A2&"M" in another cell. The result is the text 250M, not the number 250 with a display suffix.

That distinction matters in later steps. Excel generally cannot use text such as 250M as an ordinary numeric input to arithmetic without converting or extracting the number first. A text result may also sort differently from numeric values; for example, alphabetical sorting can put “100M” before “20M.” If the goal is only to make a numeric column look compact, use a custom format instead.

Concatenation uses the ampersand operator. The cell reference supplies the number, and the quoted string supplies the letter. If A2 is blank, the formula returns M, so consider whether that is desirable in your report. You can keep the formula in a separate presentation column and retain the original numeric column for calculations and analysis.

Choose the right method for your task

  • Use a custom suffix format when you want a numeric value such as 250 to display as 250M and still work in calculations.
  • Use a scaling format when the number represents millions and you want 1,250,000 to display as 1.3M.
  • Use concatenation when the output needs to be text, for example for a label or a system that expects a text field.
  • Keep the value unformatted when exact figures need to be copied, exchanged, or compared without ambiguity.

It can help to separate data from presentation. Store amounts as numbers in one column, then apply a number format or create a labeled display column beside them. That way, a later change from M to another display style does not require rebuilding the original data. It also makes it easier to create totals, averages, charts, and pivot tables from the numeric source.

Common problems and checks

The M is missing or behaves unexpectedly: Put the letter in straight double quotation marks in the custom format, as in 0"M". Without quotes, a character may be interpreted as part of a number format rather than as the literal suffix you intended. Use the Custom category in Format Cells to inspect the exact code.

The displayed number is much smaller than expected: Check whether the format contains trailing commas. 0,,"M" scales the display to millions; 0"M" only appends a letter. Those formats can look almost identical in the Type box but have very different effects on what appears in the cell.

The number is left-aligned or will not calculate: A formula like =A2&"M" creates text. If you need arithmetic, use the original numeric cell or a custom number format. Changing the text label’s appearance does not turn it back into a numeric value.

Only some cells change: Check that the selection included the full range, and check whether conditional formatting or another later formatting rule affects the cells. Also confirm that the source cells contain numbers rather than numbers already stored as text. A custom number format changes numeric values, not arbitrary text strings.

The displayed precision seems wrong: A format with one decimal place rounds the display. It does not round the stored value. Increase the number of decimal places in the format if readers need more detail, or inspect the formula bar for the underlying value.

Formatting, formulas, and data sharing

Custom formats are useful in a workbook, but not every destination treats them the same way. When you copy a cell, Excel may copy both its value and formatting, depending on the paste option. Pasting values into another program may carry only the underlying number, so the M can disappear. A formula that returns text may preserve the suffix more consistently in a plain-text export, but it also exports text rather than a number.

For charts and analysis, numeric source data is usually the safer foundation. A chart can use the underlying values and, where suitable, display values in millions through its own axis or data-label formatting. If you turn every source number into text, Excel may not treat those entries as a numeric series. For a report that will be read outside Excel, include a clear heading or note stating whether the figures are raw values or shown in millions.

Before sharing a workbook, check both the visible result and the formula bar. The cell may show 1.3M while the formula bar reveals 1,250,000; that is expected for a custom display format. If the formula bar instead shows a text formula result, the cell contains text. This simple check helps prevent confusion about whether the displayed suffix changed the actual data.

Frequently Asked Questions

How do I add M after every number in a column?

Select the numeric cells, open Format Cells with Ctrl+1 on Windows or Command+1 on Mac, choose Number > Custom, and enter #,##0"M". The M appears after each value, and the cells remain numeric.

How do I show 1,000,000 as 1M in Excel?

Apply the custom format #,##0,,"M". The two trailing commas scale the display to millions. The stored value remains 1,000,000, even though the cell shows 1M.

Does adding M with a custom format change the number?

No. A custom number format changes how a numeric value appears, not the value stored in the cell. A million-scaling format also changes only the display scale; it does not divide the stored number.

Should I use a formula or a custom number format?

Use a custom format if the result must remain numeric for calculations, sorting, or charting. Use a formula that joins the value and M when you specifically need a text result, such as a label or a text export.

Can I use lowercase m instead of uppercase M?

Yes. Put the lowercase letter in quotes in the custom format, such as 0"m", or use it in the text formula. The choice of case affects appearance only; it does not change the number or its scale.

Related

Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.

More in Formulas & functions

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.