Rows not hidden yet

Google Sheets – Group Rows and Columns with Linked Example File

When working with spreadsheets of data in Google Sheets, you’re often switching between different levels of information, and you might find yourself wishing you could control the visibility of data you don’t need so that you can make the presentation clearer. There is a way to do exactly this, by grouping rows and columns so you can easily collapse and hide them or expand them into view.

Grouping Rows

In the example below and in this linked example Sheet, we have individual sales data for a range of products, with quarterly subtotals, and an annual total. To see the quarterly sales information more clearly, we would like to hide the data for the individual products.

Rows not hidden yet

To do this, we’ll create groups for the data we don’t need to see. Begin by selecting some rows that you would like to hide.

First row selected

With the rows selected, right-click anywhere inside the selection and select ‘Group Rows 2 – 9’ (or whatever row numbers you have selected) from the menu.

Right-click menu

This will create a group for the selected rows, which you will see depicted by a thin bracket on the left of the selected rows, along with a small button with a minus sign inside it. This button lets you collapse or expand the group.

Minus sign

If you click the minus button, the group of rows will be collapsed and hidden from view. The button remains visible (this time with a plus sign) so that you can click on it again to expand the rows.

Arrow pointing to minus sign

Repeat these steps for each of the other quarterly product data so that you end up with only the quarterly sales figures showing.

Collapsed rows

Now we’re showing only quarterly sales figures, and the data is much easier to read!

Step-by-Step Video

Layered Groups

Let’s say we want to be able to show only annual sales figures as well. We can create another group, alongside the groups we just created, to toggle on and off everything except the annual sales data.

Select all of the rows corresponding to individual product data and quarterly sales figures. Do not include the row with the annual sales figures at the end, or the header row at the top.

Expanded rows

With the rows selected, right-click anywhere inside the selection and select ‘Group Rows 2 – 31’ (or whatever row numbers you have selected) from the menu.

Right-click group rows

This will create a new group that allows us to collapse all the quarterly sales data and only show annual sales data, alongside the groups that we created before.

Second level minus

Now if you click the button for the new group, only the annual sales figures will be showing.

Parent and child rows collapsed

Grouping Columns

It is also possible to create groups for columns, using the same steps as we used for rows. Select the columns that you would like to hide.

Columns selected

Right click anywhere inside the selection and click ‘Group Columns C – D’ (or whatever columns you have selected) from the menu.

Right-click group columns

This creates a group for the columns, depicted above them by a thin bracket and a toggle button, which we can click to collapse or expand the columns as we did with the rows.

Minus columns

Group Options

Right clicking on the group bracket brings up a menu that gives us some options about how to display the group. For example, if you would like the toggle button to appear at the bottom of the group, right click on the group bracket on the left of the rows, and click ‘Move +/- button to the bottom’ from the menu.

Move plus/minus to bottom

You can see there are several other useful options on the menu that give you control over how your data is being displayed.

That’s it!

Grouping rows and columns in Google Sheets gives you control over what is displaying in your spreadsheet, giving you the ability to highlight different levels of information at different times without the view being cluttered with data you don’t need to see. Hope this tutorial has been useful for you and your business!

Follow image below for the live Google Sheet with this data

docs share icon


Google Sheets Inventory Tracking Template | Step-by-Step Tutorial

This article will walk you through how our inventory tracking template is created.

Prepare the Sheet

In order to have all of the right column headers, start the spreadsheet by adding the following labels in the first row:

  • Item
  • Beginning balances
  • Purchases
  • Sales
  • Ending balance
  • Purchase Price
  • Ending Value

Enter the Items and Amounts

Enter your item descriptions in the first column under the Item header. When you use this spreadsheet for the first month, you need to hard-code the beginning balances. In subsequent months, you will be able to link the beginning balances to the prior period’s ending balances. We will review how to do that later but, for now, just type your amounts in.

We’re using an ice cream shop as an example so the example is using vanilla as one of the flavors. During the first month, you purchased four units and you sold two.

For the ending balance, you will use a formula. If your table is set up with the same rows and columns as the example, your formula for the ending balance should be =C4+D4-E4.

Formula for ending inventory 
Ending Inventory

Consider using this template. This is the end result of what are discussing below and what is shown in the video below as well.

Purchase Price and Ending Value

For purchase price, use the last price that you paid for a gallon of this ice cream flavor. That way, the value will reflect the market value closely if it’s the most recent market price. For the ending value, we’re going to take the ending balance, which is column F, multiply it by the latest purchase price, which is G4, =F4*G4 and that’s the ending value of your vanilla inventory.

Formula for ending value 
Ending Value

You need to remember to update the purchase price every time you buy it or it’s not going to reflect the current value.

To share this Sheet with everyone in your organization, consider upgrading your Google environment to G-Suite. This would also allow you to have  more space in Google Drive and to use a email address with Gmail. Send me a message for your unique 20% discount code for your first year.

Watch the video

This site has a companion YouTube channel that has pretty much, well almost exactly, the same content. If you like this, you'll like that.

Total Inventory Value

Next, we’re going to total the value of our inventory. Go to the bottom of the ending value column and type =SUM for your formula. Open up the parentheses and choose the range of all the ending values. I went back in and I filled out some activity for two more flavors of ice cream.

The ending value of this inventory is the total shown in the ending value column. To reflect the proper value of your inventory in your financial records, you need to adjust it to this number if that’s not what the balance is now.

Formula for total
Total Inventory Value

Formatting your Sheet

Let’s do a little bit of formatting so it’s easier to read. In order to get all of the numbers in the value column to have two decimal points, change the formatting to Number by going to the Format menu, choosing Number, and then selecting Number again. Now all of the decimal points are lined up which makes it visually easier to read.

Number format
Number Format

Let’s do a bottom border to show that this is the sum at the end of the table. Using a thick line at the end of a column of numbers helps a reader see that it is the end of the series.

Bottom Borderl
Bottom Border

Book to Actual Comparison

After all of your careful tracking, some of your inventory is going to mysteriously shrink, right? Or, you’re going to purchase something and record it incorrectly. In other words, this ending value over the months is going to become inaccurate no matter how hard you try to keep it right.

What you can do is a monthly or a quarterly physical inventory. Let’s add a physical count column. Let’s recheck the purchase price to make sure there are no errors there either. Then, add in actual value using a formula, in this case, of =I6*J6.

Formula for actual value
Actual Value

You don’t need to do physical counts throughout the month. You don’t really need to do one every month. But, if you want to double check yourself, this is a great way to do it. If any of these amounts or prices are different, the ending value of the count won’t match the ending book value in the spreadsheet to the left.

Adjust your GL

After you do your physical count and you check your prices, this is the dollar amount that you should have recorded in your general ledger as your inventory. For the months that you do a physical count, you should adjust your inventory to actual and then book the difference to your cost of goods sold.

Note that the first worksheet in the template is linked to a second that you can use for a subsequent month. This process can be repeated for as many months as you would like. Link the beginning values of the subsequent month to the ending values of the preceding month. You do this by typing =, left-clicking on the cell that you want in the other worksheet, and hitting enter.

That wraps it up for creating and using your new simple inventory management template. Hopefully you find this helpful for your business!


Go to the Template here. Choose File -> Make a Copy to copy it into your drive.

Table of data before being used in a Pivot Table

Google Sheets Pivot Tables – Basic Tutorial

This tutorial will walk you through the steps of creating your first Pivot Table. I already made one on this linked Google Sheet with the source data on the “Raw Data” sheet and the Pivot Table on the, you guessed it, “Pivot Table” sheet. The Pivot Table in the linked file is what you will have at the end of this tutorial.

Start with Good Data

Table of data before being used in a Pivot Table
Table of data before being used in Pivot Table

The table of data in the image above is a good example of what makes good data for a Pivot Table. It has headers and the names of the headers describe the data that’s underneath it. The Sales Rep header is on a column that contains the names of the sales reps (duh). More importantly there are no breaks in this data meaning that there are no blank lines. Also, the table is so large that you can’t just look at it and get the information. If the table of data was small, there could be no need for a Pivot Table since you could see all of your answers by eyeballing the data yourself. More training is available on how to prepare data for a Pivot Table as part of a Pivot Table Course designed with beginners in mind.

Video Explanation

Create Your Pivot Table

Go to Data then Pivot table
Go to Data then Pivot table

Learn to Summarize Data in Seconds

Contains 10 videos, LINKED GOOGLE SHEETS for you to copy and use, quizzes, and built-in notes. You'll have lifetime access to this course.

Make sure that you have selected a cell within the source table of data then go to the menu, select Data, and Pivot table as shown in the image above. That gives you a blank slate that you’re going to work with. Sheets will “suggest” different Pivot Table configurations using artificial intelligence to as shown in the image below. Unless you have very simple data, and you just want to have it summarized by one dimension, these are not going to guess what you want because there are so many different combinations. But, if you do just try one of these and click on it, it’s going to build a table for you which can be helpful if you have simple needs.

Suggested Pivot Table Configurations
Suggested Pivot Table Configurations

Add Data to the Pivot Table

Now we will start building out our Pivot Table. If we want to analyze the data by Sales Rep first, and get the Sales Reps names going down the left-hand column, this is where it gets little bit confusing and it may be more clear to watch in the video. You want the Sales Reps names in the leftmost column, but you want the name of each salesperson to be in a row. You need to add the Sales Rep for Rows even though these rows will be filling the first column. Sheets will fill them into the Pivot table in alphabetical order.

For the columns, you want the Ship Mode, and again, this is a little bit confusing, right? This is a row. It’s going to be your row of headers, but each column is going to have the data in it so it’s called Columns. Let’s add the Ship Mode.

Add Sales Rep as a Row
Add Sales Rep as a Row
Add Ship Mode as a Column
Add Ship Mode as a Column

You’ll notice, each time you add a field, it’s asking if you want to show the totals or not. Let’s leave both of those checked and there will be a Grand Total for the Sales Rep and a Grand Total for the Ship Mode.

Leave on the Show totals option
Leave on the Show totals option

The Values field is going to be what it shows you in the middle of your pivot table. For this table, we will be looking at the number of sales, not the dollar amount. Go to values and add our Sales column. It’s the field with the dollar amounts in it. Sheets defaults to summing dollar amounts. We want to count each one of them as one so we are going change the function from SUM to COUNT.

Add the COUNT of Sales
Add the COUNT of Sales
Basic Pivot Table
Basic Pivot Table

Add the Dates

Now that we have Sales Rep and we have a count by each Ship Mode, the last thing we want to do is look at the data by year. Let’s have the dates on the left-hand side to the right of Sales Reps. Remember this is called rows, even though it’s a column. Let’s add another column of rows, and we are going to make it the date.

Add Date as Another Row
Add Date as Another Row
Pivot Table with Too Much Detail
Pivot Table with Too Much Detail

Group the Dates

This isn’t what you want, right? We want it by year but, in order to do that, you had to add the dates. What you can do is right click on any of the dates, and create a pivot data group, and select Year.

Pivot Table Grouping by Year
Pivot Table Grouping by Year

This is going to summarize the data by year because Google Sheets recognizes the data as valid dates. It can extract the Year and summarize by just that.

Pivot Table Grouping by Year
Pivot Table Grouping by Year

Filter by Date

Let’s say you’re just looking for 2018. Let’s go back to the right, scroll down to the filters. We’re going to add a filter for the date. This will be a little bit tricky how we’re gonna do this. Let’s do a drop down it said showing all items. We’re going to select clear and then we’re going to type in 2018. We’re going to hit select all.

Pivot Table Date Filter
Pivot Table Date Filter
Pivot Table Just 2018
Pivot Table Just 2018

What we’re doing here is, we’re saying unselect everything, show no dates. Then, if you type in 2018, it’ll show only the 2018 dates that are in the original table. If you click select all, it’s going to select only the 2018 dates. Click OK. You have this filtered by 2018. Click OK, and there you are.

Completed Pivot Table

A really easy to understand pivot table with just the data that you need and, if you want to change anything, this is always live. I could just go back here and customize it however you want. So that’s all. Taking a good solid list of data that has columns with consistent data types in it, no blanks, and we’ve created this pivot table that gave you the exact information that you wanted to see.

Finished Pivot Table
Finished Pivot Table
Table of data before being used in a pivot table

Google Sheets – Group Data Inside a Pivot Table

Pivot Table Groups

If you’re using a Pivot Table in Google Sheets, and you want to create groups within that pivot table, you can do it with just a few clicks.

As can be seen in the linked example Sheet, we have a table of sales transactions and we are going to group them by region.

This tutorial assumes that you you have already completed your Pivot Table and you have a basic knowledge of how to use them. See this video if you need some basic help on Pivot Tables or take a deep-dive in our comprehensive training course.

If you need a primer on Pivot Tables, this video will walk you through them.

Raw Data

When you look at the table below, we can see we have different regions. We have West, East, North, and, um, just one mile left of North.

Table of data before being used in a pivot table
Table of data before being used in pivot table

Build Your Pivot Table

Let’s make the rows of our Pivot Table the value in the Region column from the table of raw data. Select any cell in the table of data and go to Data and Pivot table. This will start to fill your Pivot Table. Click ADD for the rows and select “Region”.

Selecting Region as the row
Selecting Region as the row

Contains 10 videos, LINKED GOOGLE SHEETS for you to copy and use, quizzes, and built-in notes. You'll have lifetime access to this course.

To fill in the center of the Pivot Table with data, select ADD for the Values and choose SUM which is the default. This will show the sum of the sales by Region.

Add Amount as a value and SUM it
Add Amount as a value and SUM it

Let’s add another value here to make it look a little bit more informative. We also care about the item, right? Okay, add that as a column. This will give your Pivot Table a broader display of data.

Add Item as a Column
Add Item as a column

Video Description

Grouping the Data

Now let’s group together the compass directions and then group the One Mile Left of North in another group because he’s a little bit different so we want to analyze him differently. What you want to do highlight the three that you want to group separately, right click, and create a Pivot group as shown in the image below.

Add the Pivot Table Groups
Add the Pivot Table Groups

Now the Pivot Table has put the three compass direction territories together and then the one oddball on its own. Now you can expand and collapse these groups in the same way that you can in a spreadsheet without a Pivot Table. That’s the way to group data in a Google Sheets pivot table. That’s basically all.

Insert checkbox menu option

Google Sheets – Create an Interactive Task List

This tutorial will show you how to create an interactive to-do list in Google Sheets including automatic strikethroughs when you mark tasks complete with a checkmark.

Insert Checkboxes

Insert checkbox menu option
Insert-> Checkbox

As shown in the image above, the core functionality of this list will be driven by checkboxes. You can enter them into your spreadsheet by going to the Insert menu and choosing Checkbox. Insert one and then copy and paste it down until you have as many as you want. Add your tasks in the column to the right of the checkboxes.

Conditional Formatting

Now, if you’re like me, when you’re done with the task, you’d love to be able to check it off and get a little strikethrough, right? You can feel like you’re accomplishing something. The strike through will come from using the conditional formatting feature.

Conditional formatting
Conditional formatting menu option

After selecting Conditional formatting, a Conditional formatting rules box will appear on the right. Look closely at the picture below. For the range, we have specified C5:C which will select everything in column C from row 5 and below, assuming that is where you have placed your list of tasks. Once you move out of this input field, you should see that everything in column C starting a row 5 and down to the end of where you have things typed is highlighted.

If you want to learn more about the complex subject of conditional formatting, I have created a course about it over at Datacamp. This is an affiliate link and if you use it to make a purchase I will receive a portion of the proceeds. Thank you for supporting my channel!

Conditional formatting rules
Conditional formatting rules
Watch the video

This site has a companion YouTube channel that has pretty much, well almost exactly, the same content. If you like this, you'll like that.

Custom formula

Right now, it’s just applying formatting as Cell is not empty because that’s the default choice. Change that by going to the drop down menu below Format cells if… and choosing Custom formula is. Now this box is waiting for a custom formula. Left-click into it to put the cursor in it. Whenever you’re typing a formula, even if it’s in here, you start it with an equals sign. Type the formula =B5=TRUE. Make sure you don’t use the period at the end. When a checkbox is checked, it changes the value of the cell from FALSE to TRUE. This formula will check for the TRUE state.

If the value is true, we will apply Custom Formatting style. Choose a style to make strike it through and make the background gray so it looks like it’s going away.

If you want to add something else at the bottom, you won’t have to redo this rule because that formatting contains the entire column after C5.

Completed Task List

Finished task list

Pretty easy to put together. Really satisfying to use. Have some fun with it, and let us know how it turns out.

Follow image below for the live Google Sheet with this data

docs share icon