How to Fix the 10 Million Cell Limit Error in Google Sheets

intermediate📗 Google Sheets2026-04-18| Google Sheets (Web version), Google Apps Script, Google Workspace

Error Message

This action would increase the number of cells in the workbook above the limit of 10000000 cells
#google-sheets#cell-limit#performance#bigquery

The ProblemGoogle Sheets isn't infinite. Every workbook has a hard cap of 10 million cells. While that sounds like a massive number, it counts every single cell across every tab—even the ones that are totally empty.

You will likely run into this wall when importing a large CSV, pasting a massive dataset, or running a script that generates new rows. Once you hit the limit, Google blocks any action that would add even one more cell, displaying this frustrating error:

This action would increase the number of cells in the workbook above the limit of 10000000 cells

Why your workbook is bloatedMost users don't actually have 10 million rows of data. Instead, they fall victim to "blank space bloat." When you create a new tab, Google Sheets defaults to 1,000 rows. If your sheet has 26 columns (A to Z), that is 26,000 cells instantly. Add 40 tabs like that, and you've already burned through 1 million cells before typing a single word.

Automation is another common culprit. Many scripts append data to the bottom of a sheet without cleaning up the trailing empty rows, causing the grid to expand indefinitely until it hits the ceiling.

Step-by-Step Fixes### 1. Audit your cell usageYou cannot fix what you cannot see. Before you start deleting data, you need to identify which specific tab is eating your budget. A sheet with 50 columns and 200,000 rows will hit the 10 million limit all by itself.

To find the culprit, go to Extensions > Apps Script and paste this snippet:

function checkCellCount() {
  var ss = SpreadsheetApp.getActiveSpreadsheet();
  var sheets = ss.getSheets();
  var totalCells = 0;
  
  sheets.forEach(function(sheet) {
    var rows = sheet.getMaxRows();
    var cols = sheet.getMaxColumns();
    var cellCount = rows * cols;
    totalCells += cellCount;
    Logger.log(sheet.getName() + ": " + cellCount.toLocaleString() + " cells (" + rows + "x" + cols + ")");
  });
  
  Logger.log("TOTAL WORKBOOK CELLS: " + totalCells.toLocaleString());
}

Run the function and open the Execution Log. This provides a clear list of every tab and its total cell count, showing you exactly where to focus your cleanup.

2. Delete unused rows and columnsTrimming the "dead weight" is the fastest way to resolve the error. If your data ends at row 2,000 but the sheet extends to row 50,000, you are wasting 48,000 rows of potential space.

  • Click the row number of the first empty row below your data.- Press Ctrl + Shift + Down Arrow (Cmd + Shift + Down on Mac) to select everything to the bottom.- Right-click and select Delete rows.- Repeat this process for unused columns on the right side of your data using Ctrl + Shift + Right Arrow.### 3. Automate the cleanup with a scriptManually cleaning 30 different tabs is tedious. This script automatically trims every sheet in your workbook, resizing the grid to fit only the area that contains actual data.
function trimAllSheets() {
  var sheets = SpreadsheetApp.getActiveSpreadsheet().getSheets();
  
  sheets.forEach(function(sheet) {
    var lastRow = sheet.getLastRow();
    var maxRow = sheet.getMaxRows();
    var lastColumn = sheet.getLastColumn();
    var maxColumn = sheet.getMaxColumns();

    if (maxRow > lastRow && lastRow > 0) {
      sheet.deleteRows(lastRow + 1, maxRow - lastRow);
    }

    if (maxColumn > lastColumn && lastColumn > 0) {
      sheet.deleteColumns(lastColumn + 1, maxColumn - lastColumn);
    }
  });
}

4. Move heavy data to BigQueryIf you genuinely need to analyze 10 million rows, Google Sheets is no longer the right tool. It is designed for calculation and collaboration, not high-volume data storage. Performance will crawl long before you hit the cell limit.

Try using Connected Sheets for BigQuery. This allows you to store millions of rows in a database while using the familiar Google Sheets interface to build pivot tables and charts. The data lives in the cloud, so it doesn't count toward your 10 million cell limit.

VerificationAfter cleaning, run the checkCellCount() script again. You should see a significantly smaller number. If you were at 9,999,000 and dropped to 2,000,000, you have successfully cleared enough room to work without fear of the error returning.

Pro-Tips for Performance- Limit whole-column ranges: Formulas like =A:A+B:B force Google to calculate every single row in the sheet. Use specific ranges like =A1:A1000 when possible.- Watch your imports: Tools like Supermetrics or Zapier often create thousands of "ghost" rows. Set your imports to overwrite data rather than appending it.- Split workbooks: If you have 2023 data and 2024 data in one file, move the older data to an archive workbook. Use IMPORTRANGE() to pull only the summaries you need into your active sheet.

Related Error Notes