# [Google Spreadsheet] What is the maximum number of rows? I tried to verify

## Maximum number of rows in a Google Sheets workbook

What is the maximum number of rows in a Google Sheets workbook? I tried to verify.

So, let’s try adding 1,000,000 rows.

Yes … I got the answer suddenly.

## Cell limit

Apparently, there is a “limit of 50000000 cells in the workbook”.

Hmm? Is it possible to go because it is 1,000,000 lines? I thought,

If you look closely, the point is that the limit on the number of cells is 5,000,000, not the number of rows.

So, if there is a column B ~,
When I try to add 4,999,999 lines, I can’t.

## Maximum number of lines

So for the maximum number of rows in a spreadsheet
“Row x column = 5,000,000 is the maximum”
It seems that it will be.

If you ask for the square root of 5,000,000,
= SQRT (5000000)
= 2236.067977

That is, if the matrices are the same number,
The maximum is 2,236 rows x 2,236 columns (= 4,999,696),
It means that.

When it comes to 2,236 rows x 2,237 columns,
= 5,001,932,
It will be over.

Since the columns are from the beginning to “Z” (26th column),
If you add the number of rows with the initial number of columns
?? × 26 = 5,000,000.
The answer to “?” Is likely to be the upper limit of the number of lines.

5,000,000 ÷ 26 ＝ 192,307.…

With 27 columns, the number of cells will be “5,192,289”, which exceeds the upper limit.

As expected, we were able to add up to “192,307 lines”!

When I try to add lines 192,308, I get a warning that the number of cells in my workbook exceeds the 5000000 limit. It was the result I expected.

## 何行までいけるのか？

The number of cells seems to be “just 5,000,000”.

However, if you increase the number of cells to 5,000,000 on Sheet 1,
You will not be able to add new sheets.

Because the new sheet is row 1,000, column Z (26)
When making a new sheet
26,000 cells (1,000 x 26) or more in advance
Must be free.

## If you increase the number of cells too much…

By the way, if you increase the number of cells too much, the processing will be too heavy and the PC may freeze.

## Summary

When dealing with a large number of cells and rows, it seems better to do it when you are not doing anything else (-_-;)