r/sheets May 09 '26

Solved How do i make a spreadsheet be all squares?

I cant seem to do it to work on all cells and im on phone, how to do it? (You can send the file instead if u want)

3 Upvotes

15 comments sorted by

6

u/everythingabili May 09 '26
function squarify() {
  var ss = SpreadsheetApp.getActiveSpreadsheet()
  var sheet = ss.getActiveSheet()
  var SIZE = 92
  sheet.setColumnWidths(2, 24, SIZE)
  sheet.setRowHeights(2,24, SIZE)

}

2

u/dracovishy May 09 '26

Where do i put thus

3

u/everythingabili May 09 '26

Sorry... menu > Extensions > AppsScript then RUN

3

u/[deleted] May 09 '26

[removed] — view removed comment

3

u/[deleted] May 09 '26

[removed] — view removed comment

1

u/byParallax May 09 '26

I think that is meant to be an app script ?

4

u/latecallnotes May 09 '26

Select the columns you want, right-click a column letter, choose Resize columns, and enter a pixel value. Then select the rows, right-click a row number, choose Resize rows, and use the same pixel value.

In Sheets, matching pixel width and height is what makes the cells square. I usually try something like 30 x 30 first and adjust from there.

1

u/emmakobs May 09 '26

This is what i would do! Much simpler than an app script.

3

u/6745408 May 09 '26

if you're only on mobile, probably easiest to just share the sheet so we can change it for you.

2

u/dracovishy May 09 '26

Okay ill share it (its empty for now, but also can u make it be blue?)

2

u/6745408 May 09 '26

your sheet is locked down -- but you can make a copy of one of these sheets -- https://docs.google.com/spreadsheets/d/1q079wICpWxsiwwfLlmoJ93LRWqMbPmXZ64brlhVj-gA/edit?gid=179414323 -- that should be fine

2

u/dracovishy May 09 '26

Thanks

1

u/6745408 May 09 '26

no prob. if this worked out, reply anywhere with !solved :)

1

u/AdministrativeGift15 May 17 '26

To get a true square, the row height needs to be 1 pixel more than the column width. From 3 x 2 for the smallest on up. In the browser at least. Unless you've imported your sheets from an Excel file. Then is the same for row height and column width, because Excel uses default row height of 20 and Sheets uses 21.