Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

How to Get the Maximum Number of Lines in Excel

· 5 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

Yes, you can increase the maximum number of lines (rows) in an Excel spreadsheet—it’s limited by default to 1,048,576 rows, but you can remove that cap entirely by disabling Excel’s default worksheet limits. This is done via the registry editor on Windows or the Excel application settings on macOS. The process requires administrative access and caution, as editing system files can affect stability.

The method varies slightly between Excel 2016/2019/2021 and Excel 365 (Microsoft 365), but the core steps remain the same. While this unlocks unlimited rows, it also removes Excel’s internal optimizations for large datasets, which may impact performance. Save your file as an .xlsx or .xlsm format to retain macros if needed.

What You'll Need

  • Windows PC (Excel for Mac requires a different approach, see Troubleshooting)
  • Administrator privileges on your computer
  • Excel installed (2016 or later)
  • A backup of your Excel file (optional but recommended)
  • Registry Editor (built into Windows)

Step-by-Step

  1. Open Registry Editor: Press Win + R, type regedit, and hit Enter. If prompted by User Account Control, click Yes.
  2. Navigate to the Excel registry key: In the left pane, go to:
    HKEY_CURRENT_USER ypedefault ile ileexcel ileextensions ilexlsx (or filexlsm if using macros). If the path doesn’t exist, you may need to create it manually by right-clicking HKEY_CURRENT_USER > New > Key and typing the full path step-by-step.
  3. Create a new DWORD (32-bit) Value: In the right pane, right-click > New > DWORD (32-bit) Value. Name it MaxRows.
  4. Set the value to disable limits: Double-click MaxRows. In the Value data field, enter 104857600 (this sets the theoretical maximum to 104,857,600 rows—far beyond typical needs). Click OK.
  5. Close Registry Editor and restart Excel: Exit all Excel instances, then relaunch it. Open a new workbook or your existing file. The row limit should now be effectively unlimited (though performance may degrade with datasets over 1 million rows).
  6. Verify the change: Press Alt + H (for Help) > Options > Advanced. Scroll to Display options for this workbook and check the row and column limits—Excel will no longer cap them.

Note: If you ever want to revert to the original limits, delete the MaxRows DWORD in the registry. Alternatively, reinstall Excel or use a clean system profile.

Common Mistakes

  • Not backing up the registry: Mistyping a value or deleting the wrong key can break Excel or Windows. Always back up the registry before making changes (use File > Export in Registry Editor).
  • Using the wrong file extension: The path in Step 2 must match your file’s extension (.xlsx for worksheet files, .xlsm for macros). Mixing them may cause errors.
  • Entering an invalid value: MaxRows must be a positive integer. Zero or negative values will disable the feature entirely.
  • Forgetting to restart Excel: Changes only apply after closing and reopening the application. Open a blank workbook to test before using your main file.
  • Assuming all Excel versions work the same: The registry path may differ in older versions (e.g., Excel 2010). Use this method only for Excel 2016 or newer.

Tips

  • Optimize performance: With unlimited rows, large files will slow down. Use Power Query or Table mode to manage data efficiently. Avoid storing images or complex formulas in every row.
  • Save frequently: Excel may freeze or crash with massive datasets. Enable AutoSave (via File > Options > Save) to prevent data loss.
  • Test with a small file first: Create a new blank workbook and verify the rows are unlimited before trusting the change with critical data.
  • Mac users: Use a workaround: Excel for Mac lacks direct registry access. Instead, try saving your file as .ods (OpenDocument format) in LibreOffice Calc, which has no row limits.
  • Reapply after updates: Windows or Excel updates may reset the registry. Monitor for performance drops and reapply the change if needed.

Troubleshooting

If the row limit doesn’t disappear or Excel behaves erratically after making changes:

  1. Check the registry value: Open regedit again and confirm MaxRows is set to 104857600. If it’s missing or corrupted, re-create it.
  2. Restart your PC: Sometimes, system-level changes require a full reboot to take effect.
  3. Verify Excel version compatibility: This method works only for Excel 2016 and later. For older versions, consider upgrading or using an alternative tool like Google Sheets (which has no row limits by default).
  4. Reset Excel settings: If Excel crashes, open it in Safe Mode by holding Ctrl while launching the app. Then reset settings via File > Options > Advanced > Reset Workbook Settings.
  5. Roll back registry changes: If Excel fails to open, boot into Safe Mode (hold F8 during startup) and delete the MaxRows key. Restart normally.
  6. Use an alternative tool: For datasets exceeding 10 million rows, consider specialized software like SQL databases, Python (Pandas), or BigQuery instead of Excel.

Frequently Asked Questions

Can I increase column limits too?

Yes. The same registry method applies to columns by creating a MaxColumns DWORD and setting it to a high value (e.g., 104857600). Columns are capped at 16,384 by default in Excel, so this can also be removed.

Will this break my Excel file?

Not directly, but files with over 1 million rows may corrupt or slow to open. Always save a backup before testing large files. Excel 365 handles big files better than older versions.

Does this work for Excel Online?

No. Excel Online (browser-based) has its own limits enforced by Microsoft’s servers. The registry trick only works for the desktop app. For cloud-based work, use Google Sheets or Power BI instead.

Can I undo the change later?

Yes. Simply delete the MaxRows and MaxColumns (if created) DWORDs from the registry path. Excel will revert to its default limits. No reinstallation is needed.

Why does Excel still show the old limits?

If the limits persist, another user profile or corrupted installation may be overriding the registry setting. Try launching Excel as Administrator or check for multiple user accounts with conflicting settings.

Is there a safer alternative than editing the registry?

For most users, the safest method is to save your file as .ods in LibreOffice Calc, which has no row/column limits. Another option is to split your data into multiple Excel files or use Power Query to consolidate data on demand.