Google-sheets – How to prevent sorting on lower rows in Google Sheets

google sheets

I want to be able to sort columns in a sheet. I know how to do this, and I know how to freeze 1 or two top rows so that the headings don't get sorted.

My question is this:
How do I prevent a "totals" row from being sorted?

e.g. in the image below, I want to be able to sort by number of bananas, but I don't want the totals to move when I start sorting:

screen shot

With a bit more googling, seems the best way is to select the cells I want to sort, right click and select "Sort Range". Is there any other way?

Best Answer

Try using Filter Views as they allows you to set the range. The following screen snippet shows the Filter View range setting, just click on it to set the appropriate range reference.

For details see Sort and filter your data