How Many Rows in Excel? Limit & Workarounds
In this article
Excel's row limit is 1,048,576 rows per worksheet. That is the hard maximum in every modern version of Excel (2007 and later, including Microsoft 365). If you try to enter data in row 1,048,577 or beyond, Excel will not allow it. The column limit is 16,384 (column XFD). This guide explains the limit, how to check it, and what to do when you hit it.
What You'll Need
- A computer with Microsoft Excel installed (any version from 2007 onward).
- An Excel workbook (.xlsx or .xls) you want to check or work with.
- Basic familiarity with Excel's interface (ribbon, worksheet tabs, and the Name Box).
Step-by-Step
1. Check the exact row limit in your version
- Open Excel and create a new blank workbook.
- Click on any cell in column A, for example A1.
- In the Name Box (the box to the left of the formula bar that shows the cell reference), type
A1048576and press Enter. Excel will select that cell, confirming the 1,048,576th row exists. - Now type
A1048577in the Name Box and press Enter. Excel will show an error message: "That name is not valid." This is because row 1,048,577 is outside the worksheet's range.
Note: The exact menu labels and the Name Box location are the same across Excel 2013, 2016, 2019, and Microsoft 365, but the wording of error messages can vary slightly by version and language.
2. Understand the column limit too
- In the Name Box, type
XFD1and press Enter. Excel selects the last column (column 16,384). - Type
XFE1and press Enter. Excel will reject it, because there is no column XFE.
So the full grid is 1,048,576 rows by 16,384 columns, giving about 17.2 billion cells per worksheet.
3. What happens when you paste or import more than 1,048,576 rows?
- If you try to paste a range that extends beyond row 1,048,576, Excel will truncate the data. For example, pasting 1,048,580 rows will only paste the first 1,048,576 rows, and the remaining 4 rows will be lost.
- If you import a CSV file with more than 1,048,576 rows, Excel will only load the first 1,048,576 rows. The rest of the file is ignored.
- If you open a text file directly in Excel, the same truncation applies.
4. Use the status bar to see the current row count
- Select a range of cells by clicking and dragging, or press Ctrl+Shift+End to select from your current cell to the last used cell.
- Look at the status bar at the bottom of the Excel window. It shows "Count" for the number of cells in the selection. To see the number of rows, divide the cell count by the number of columns in the selection, or simply select an entire column by clicking the column header.
5. When you need more than 1,048,576 rows
Excel's limit is fixed; you cannot increase it. But you have practical workarounds:
- Split data across multiple worksheets: Put the first 1,000,000 rows in Sheet1, the next 1,000,000 in Sheet2, and so on. Use formulas or Power Query to combine them when needed.
- Use Power Query to load data into the Data Model: The Excel Data Model (used by Power Pivot) can handle millions of rows, far beyond the worksheet limit. Go to Data > Get Data > From File > From Text/CSV, select your file, and in the preview window choose Load To > Only Create Connection, then check Add this data to the Data Model. You can then create PivotTables from the Data Model that reference all rows.
- Use Power Pivot: If you have Excel 2013 or later (or Microsoft 365), Power Pivot is included but may need to be enabled via COM Add-ins. It can store billions of rows in memory.
- Switch to a database: For truly massive datasets (tens of millions of rows), consider using Microsoft Access, SQL Server, or a free option like SQLite. You can still connect to these from Excel via ODBC.
Common Mistakes
- Assuming the limit is 65,536 rows: That was the limit in Excel 2003 and earlier. If you have an .xls file (old format), it still has the old limit. To get the 1,048,576 limit, save the file as .xlsx or .xlsm.
- Pasting data and not noticing truncation: When you paste a large range, Excel may silently drop rows beyond the limit. Always double-check the last row after pasting.
- Using the entire column in formulas: Formulas like
=SUM(A:A)work fine, but if you accidentally reference a cell beyond row 1,048,576, you'll get a #REF! error. - Thinking the limit applies to the whole workbook: The 1,048,576 limit is per worksheet. A workbook can have many worksheets, each with that many rows.
Tips
- To quickly jump to the last row of your data, press Ctrl+Shift+End to select the entire used range, or press Ctrl+Down Arrow from the first row to go to the last used row.
- If you frequently work with large datasets, consider using Excel's Power Query (Get & Transform) to clean and load data, because it can handle more rows than the worksheet and can refresh automatically.
- Use Excel Tables (Insert > Table) for structured references. Tables can hold up to the same row limit, but they make it easier to manage large ranges.
- When importing a CSV with more rows than Excel can hold, use a text editor to split the file into smaller parts, or use a script to do it automatically.
- Remember that the row limit is the same for all Excel versions from 2007 onward, including Excel for Mac. The only exception is Excel 2003 and older.
Troubleshooting
Excel says "That name is not valid" when I try to select a row beyond 1,048,576
That's normal. The row doesn't exist. If you need more rows, use the workarounds above.
My Excel file is .xls and I can't get past row 65,536
Save the file as .xlsx (File > Save As > Excel Workbook). This will upgrade the file to the modern limit. Be aware that some formatting or features from old versions may change.
I pasted data and some rows disappeared
Check the last row of your pasted data. If it's exactly 1,048,576, the extra rows were truncated. Undo (Ctrl+Z) and paste in chunks, or split the source data into multiple files.
Power Query says "Data truncated" when loading a large CSV
This happens when you load directly to a worksheet. Instead, load to the Data Model (as described in Step 5) or load to a PivotTable. If you must have the data in a worksheet, split the source file.
My formula returns #REF! when I reference a cell beyond the limit
Check the cell reference. If it includes a row number greater than 1,048,576, Excel cannot resolve it. Fix the reference to a valid row.
Excel is slow with 1 million rows
That's expected. To improve performance, avoid volatile functions, use manual calculation (Formulas > Calculation Options > Manual), and limit the use of array formulas. Consider using Power Pivot to handle the data in memory more efficiently.
Frequently Asked Questions
Can I increase the row limit in Excel?
No. The 1,048,576 row limit is hard-coded into Excel. You cannot change it. The only way to work with more rows is to use multiple worksheets, the Data Model, or an external database.
Does Excel 365 have a higher row limit?
No. Excel 365 has the same 1,048,576 row limit as Excel 2019, 2016, and 2013. The limit has not changed since Excel 2007.
Why is the limit 1,048,576?
It's a power of 2 (2^20). Excel uses a 20-bit row index internally. The column limit is 2^14 (16,384). These numbers were chosen to balance performance and memory usage.
Can I use Excel to open a CSV file with 2 million rows?
Yes, but Excel will only show the first 1,048,576 rows. The rest are not loaded. To see all data, use a text editor or import into a database.
Does the row limit apply to Excel for Mac?
Yes, Excel for Mac has the same 1,048,576 row limit. The interface may differ slightly, but the limit is identical.
What is the maximum number of rows in a PivotTable?
A PivotTable can display up to 1,048,576 rows, but if you use the Data Model, a PivotTable can aggregate millions of rows (the Data Model can hold up to about 2 billion rows). The displayed rows are limited to the worksheet limit, but you can use filters to see subsets.