Google-sheets – Google Sheets row minimized to almost nothing when no data is present but needs to auto expand to be fully seen ONLY when data is present

google sheets

I've got a Google Sheet I'm creating for settlement purposes and I have 8 variables that only get used sometimes. Each variable has its own line devoted to it. For example, this load has a scale charge that is visible in the image I posted (but the other 7 rows are blank in the Row 14-21 range).

The data is getting pulled in from a master sheet but I'd like the empty rows to be of MINIMAL HEIGHT by default and then expand ONLY IF any data is actually present to be displayed for a particular variable.

Why do I need to do this, you ask? For space saving purposes for printing since most settlements will have multiple loads. I'd prefer not to leave 8 lines of BLANK SPACE fully expanded all the time for each load for paper-saving & aesthetic purposes. Any ideas?

enter image description here

Best Answer

  • select rows 14-21
  • right click on them
  • select resize rows
  • set to 2

if any of the rows get filled with something then the row will auto expand

note that this solution works only on old sheet versions (created before 1. September 2018)