How to Paste Long Numbers in Excel Without Losing Digits
In this article
Excel turns any number longer than 15 digits into scientific notation and silently rounds the rest to zeros, so the fix is to paste the value as text, not as a number. The quickest method is to format the destination cells as Text before pasting (select the cells, then Home > Number Format > Text), or to type an apostrophe before the value when entering it by hand. If the data is already in, you can also re-import it with the Text Import Wizard or Power Query and set the column to Text. Below are the reliable methods, why they work, and what to do when a paste still mangles your ID numbers.
What You'll Need
- Excel for Windows or Mac (the menus below are for the desktop app; Excel for the web is similar but some import options are missing).
- The long number copied to your clipboard, or a CSV/TXT file that contains it.
- A blank column or sheet to paste into, so a failed paste does not overwrite existing data.
Step-by-Step
- Decide what the number is for. If it is an identifier (account number, tracking number, credit card, phone number, barcode), it must stay as text. If you need to do arithmetic on it, Excel cannot hold more than 15 significant digits accurately, so split it or store it as text and calculate elsewhere.
- Format the destination as Text first. Select the cells or the whole column, then go to Home > Number Format and choose Text. You can also press Ctrl+1 (Cmd+1 on Mac) and pick Text on the Number tab. Do this before pasting; changing the format afterwards will not restore digits that were already rounded.
- Paste with the right option. Copy the number, click the first destination cell, then right-click and choose Paste Special > Text (or use the Paste Options button that appears and pick the Text icon). A plain Ctrl+V into a Text-formatted cell usually works too, but Paste Special > Text is more predictable when the source is a web page or another app.
- Check the result immediately. Click the cell and look at the formula bar. If the full number appears there and the cell shows it left-aligned, it is stored as text and safe. If it shows something like 1.23457E+18, the paste was treated as a number and the digits are gone.
- Use the apostrophe method for manual entry. Type an apostrophe before the number, for example '1234567890123456789, and press Enter. Excel stores the digits as text and hides the apostrophe. This is fine for a few values but tedious for a long list.
- Import CSV or TXT files as text. Do not double-click the file to open it. Instead, open Excel, go to Data > From Text/CSV (or Data > Get Data > From File > From Text/CSV), select the file, and in the preview set the column's data type to Text before clicking Load. For older Excel versions, use Data > From Text and set the column format to Text in the Text Import Wizard.
- Use Power Query for repeatable imports. Data > Get Data > From File > From Text/CSV opens Power Query, where you can right-click the column header, choose Change Type > Text, and then Close & Load. This is the most robust route for files you import regularly, because the type change is saved in the query.
- Paste into a pre-formatted text column from another workbook. If the source workbook already stores the value as text, copy it and use Paste Special > Values into a Text-formatted destination. Avoid Paste Special > All, which can carry the source formatting and re-trigger number conversion.
- Verify a sample of rows. Compare the last few digits of several cells against the source. Rounding always affects the tail of the number, so checking the end is the fastest way to catch a bad paste.
Common Mistakes
- Formatting after pasting. Once Excel has stored 1234567890123456789 as 1234567890123450000, switching the cell to Text shows the rounded value. The original digits are unrecoverable from that cell; re-paste from the source.
- Using the default paste from a browser. Copying from a web page often brings HTML formatting, and Excel may still coerce the value to a number. Paste Special > Text avoids this.
- Opening a CSV by double-clicking. This lets Excel guess column types and turns long IDs into scientific notation. Always import through Data > From Text/CSV.
- Assuming a leading zero is safe. Even in a Text-formatted cell, pasting a value that starts with 0 can drop the zero if the paste is treated as a number. Check the formula bar.
- Relying on the column width. A cell showing #### or a truncated display is a width problem, not a data problem. Widen the column before assuming the paste failed.
Tips
- Set the entire column to Text before importing, not just the visible cells, so new rows inherit the format.
- Keep a plain .txt copy of critical ID lists as a backup; if a paste goes wrong, you can re-import without hunting for the source.
- For numbers you need to sort or filter, Text format still sorts alphabetically, which is usually fine for fixed-length IDs but not for variable-length ones.
- If you must calculate with a long number, split it into two shorter parts (for example, the first 15 digits and the remainder) and combine the results at the end.
- Use Excel's Data > Text to Columns only after the column is Text-formatted; otherwise it can re-convert values.
Troubleshooting
- The number still shows as 1.23E+18. The cell was not Text at paste time. Clear it, reformat the column as Text, and paste again with Paste Special > Text.
- The last digits are zeros. Excel already rounded the value. Re-copy from the original source; the current cell cannot be repaired.
- The apostrophe is visible. The cell is formatted as Text but the apostrophe was typed as a literal character. Delete it and re-enter, or format the cell as Text and type the number without the apostrophe.
- CSV import still converts the column. In the preview step, click the column header and choose Text rather than General or Whole Number. In Power Query, use Change Type > Text before loading.
- Paste Special > Text is greyed out. This happens when the clipboard contains an image or an unsupported object. Copy the value as plain text from a text editor first, then paste.
- Only some rows are wrong. Mixed formats in the source are the usual cause. Re-import the whole column as Text rather than fixing cells one by one.
Frequently Asked Questions
Why does Excel change long numbers?
Excel stores numbers in a double-precision format that keeps about 15 significant digits. Anything longer is rounded and displayed in scientific notation. Text format bypasses the numeric storage entirely.
Can I recover the original digits after Excel rounds them?
No. Once the value is stored as a rounded number, the lost digits are gone. Re-paste or re-import from the source into Text-formatted cells.
Does the apostrophe method work on Mac?
Yes. Typing an apostrophe before a number works in Excel for Mac the same way as in Windows, and the apostrophe is hidden in the cell.
How do I keep leading zeros?
Format the cells as Text before entering or pasting, or use a custom number format such as 0000000000 if the value is numeric and a fixed length.
Can I paste a long number into Excel for the web?
Yes, but the web version has fewer import options. Format the cells as Text first and use Paste Special where available; for CSV files, the desktop app gives more control.
What is the maximum length Excel can store as text?
A cell can hold up to 32,767 characters, so long identifiers are fine as text. The 15-digit limit applies only to numbers used in calculations.