To display millions as M in Excel, use a custom number format that divides by one million and appends the letter: select the cells, press Ctrl+1 (Cmd+1 on Mac), go to the Number tab, choose Custom, and type 0.0,,"M" in the Type box. The two commas tell Excel to scale the displayed number by a million, and the quoted M prints as text after it. The underlying value never changes, so your formulas and totals stay exact while the cell reads something like 4.2M. No add-in or macro is needed, and the same approach works in Excel for Microsoft 365, Excel 2019, and later versions on Windows and Mac; the display-Large-Number options introduced in recent Excel versions can also do this with a click.

What You'll Need

  • Excel for Microsoft 365, Excel 2019 or later on Windows or Mac (the custom format technique works in older versions too)
  • Numbers already entered in cells as real numbers, not text
  • Optionally, a copy of the sheet if you plan to experiment with formatting before applying it to real data

Step-by-Step

  1. Select the cells you want to reformat. Drag across one column's worth of figures, or click the column letter if the whole column should show millions. Hold Ctrl (Cmd on Mac) to select several non-adjacent ranges. Only apply this to ranges that genuinely hold millions, since a value of 850 will display as 0.0M under this format.
  2. Open the Format Cells dialog. Press Ctrl+1 on Windows or Cmd+1 on Mac, or right-click the selection and choose Format Cells. The dialog opens on the Number tab by default.
  3. Choose the Custom category. In the list on the left, scroll down and click Custom. The Type box at the top shows the format currently in use.
  4. Type the custom format. Enter 0.0,,"M" and click OK. Each comma after the number divides the displayed value by 1,000, so two commas divide by a million. The quoted M is appended as literal text. The example box in the dialog updates as you type, so you can confirm the result before committing.
  5. Adjust decimal places to taste. For a whole million with no decimals use 0,,"M", which shows 4,200,000 as 4M. For two decimals use 0.00,,"M". For thousands with a single decimal and a K suffix use 0.0,"K".
  6. Add negatives and zero handling if needed. A format like 0.0,,"M";(0.0,,"M");"-" shows negatives in brackets, positive values with the M suffix, and zeros as a dash. Sections are separated by semicolons in the order positive; negative; zero; text.
  7. Or use the built-in large-number display. In newer builds of Excel for Microsoft 365, select the range, open the Number Format dropdown on the Home tab, and look for a large-number option such as Millions. If your version does not list it, the custom format above is the reliable route.
  8. Check the underlying value is untouched. Click one of the formatted cells and look at the formula bar. It should still show 4200000, while the cell displays 4.2M. Formulas that reference the cell use the full value in calculations.
  9. Copy the format to other cells quickly. With a formatted cell selected, click the Format Painter on the Home tab and drag over the target range. Alternatively use Paste Special and choose Formats rather than All so you do not overwrite the destination's data.
  10. Save the workbook. Custom number formats are stored with the workbook, so they travel with it. If you want the format available in every new workbook, apply it to a cell and save that workbook as a template.

If your chart axis labels or data labels still show raw millions, the cell format does not carry into the chart automatically in every case. Select the axis or labels, open the Format Axis or Format Data Labels pane, and enter the same 0.0,,"M" text in the number format field there.

Common Mistakes

Using one comma instead of two. A single comma divides by a thousand, so 4,200,000 displays as 4,200.0M, which is wrong. Count the commas carefully: one comma is K territory, two commas are M.

Forgetting the quotes around M. Typing 0.0,,M without quotation marks makes Excel read M as a format code rather than text, and it will reject the format or behave unexpectedly. Always wrap literal letters in double quotes.

Formatting numbers stored as text. If figures were pasted from another system and are left-aligned with a green triangle in the corner, number formats will not apply. Convert them to numbers first, for example by selecting the range and using the warning icon's Convert to Number option or multiplying by 1 in a helper cell.

Rounding happening at the wrong place. The custom format only changes what is shown. If you then copy those cells and paste as values, Excel pastes the full number, not 4.2. That is usually desirable, but if you genuinely need rounded values for an export, use a formula such as =ROUND(A2/1000000,1)&"M" instead, which produces text and cannot be summed.

Assuming the format truncates the value. It does not, which is good, but it means you should not rely on the displayed number for any calculation. Sums of a column of M-formatted cells will total the true amounts.

Tips

Apply the format to a whole column rather than individual cells so new rows inherit it when you paste or type fresh data. If you regularly mix thousand, million, and billion figures in one column, a conditional custom format can scale them separately, but it is easier and clearer to split them into separate columns or add a unit column.

For dashboards, keep one column holding the raw number and a second holding the formatted display so readers can sort by true size while seeing the friendly label. Add a note near the table saying values are shown in millions, because an unlabelled 4.2M can be misread as a unit shift.

Save your favourite formats by name in a template workbook; Excel does not offer a custom-format library, so the template is the practical way to reuse them.

Troubleshooting

The dialog will not accept the format. Check for a missing quote, a stray space inside the code, or a comma placed before the decimal point. The example preview shows the error immediately; correct the string and click OK again.

Numbers show as ### after formatting. This means the column is too narrow for the displayed text, not that the format is wrong. Widen the column or reduce the decimal places.

Some cells ignore the format. Those cells are probably formatted as Text. Select them, set the format to General or Number, then reapply your custom format. If the value still looks plain, the underlying data may include leading apostrophes or non-breaking spaces imported from elsewhere.

The M appears in the middle of the number. You likely placed the quote in the wrong position in the code. The text should sit after the commas, for example 0.0,,"M" and not 0.0"M",,.

Chart labels still show full figures. Reformat the data labels or axis directly in the chart pane as described above. Charts read their own number format, independent of the sheet cells in some versions.

Frequently Asked Questions

Does changing the format delete the real value?

No. The cell still holds the full number, and the formula bar shows it. Only the display is scaled and shortened.

Can I show thousands and millions in the same column?

Excel's number formats apply one scale per cell range, so a single column cannot automatically switch between K and M. Use separate columns, a formula that picks the unit, or a helper text column.

Will the formatting work when I export to CSV?

No. CSV stores the underlying numbers, not the display formatting, so the M suffix disappears on export. Use a formula-built text column if the export needs the suffix.

Why do two commas mean a million?

Each comma before the decimal point divides the displayed number by a thousand. One comma gives thousands, two gives millions, three gives billions.

Can I make the suffix show a lowercase m?

Yes. Put whatever letter or symbol you want inside the quotes, such as 0.0,,"m". Excel treats anything in the quotes as literal text.

Is there a one-click option in the ribbon?

Recent Microsoft 365 builds include large-number display choices in the Number Format dropdown. If yours does not show them, use the custom format, which works in every version.