Brought to you by:
Welcome to the Google Sheets Tips newsletter #354, your Monday morning espresso, in spreadsheet form! In last week's newsletter we compared wide and tall data, and what the pros and cons of each data "shape" were. Today, I want to show you how to move from one format to the other. How to transform tall data into wide data and vice versa. Going in one direction is easy. Going back, in the other direction, is less so. Find out which way round below! β NewsI. It's that time of year when this newsletter takes a summer break! I'll be back with issue 355 on the 18th August 2025. π II. More details about the AI function in Google Sheets, including examples of more use cases. βRead more here >>β III. Read/write support for Smart Chips in Google Sheets is now available with the Sheets API. This is welcome news for Apps Script developers! βRead more here >>β β Sheets Tip #354: Turning Tall Data Into Wide Data And Vice VersaWe saw last week that tall data is good for analysis and pivot tables, because the data is in columns. However, wide data is easy to read and good for charts because the data is in a 2-D grid, separated into series. Here's a quick reminder of what these tables look like: Now let's see how to move from one format to the other, and back again. Let's start with the easier transformation. Turning Tall Data Into Wide Data (easy)This is the easier transformation of the two, because pivot tables work well with tall data. Select a cell inside a tall dataset or table and go to the menu: Insert > Pivot table Then we can create a 2-D wide dataset by selecting a column for the rows and a column for the column headings. In our example, it looks like this: Turning Wide Data into Tall Data (hard)This is harder, but possible with formulas. It's sometimes called an unpivot. Suppose we have a dataset in A1:E9. Enter this formula in a blank cell: =ArrayFormula(A2:A9&"π΅"&B1:E1&"π΅"&B2:E9) (You can pick any emoji or symbol to separate the range references!) This combines the headers, row labels and values in a grid: Next, we use the TOCOL or FLATTEN functions to stack these vertically: =ArrayFormula(TOCOL(A2:A9&"π΅"&B1:E1&"π΅"&B2:E9)) which looks like this in our Sheet: Finally, we split the rows into columns with the handy SPLIT function with the emoji as the delimiter: =ArrayFormula( SPLIT( TOCOL( A2:A9 & "π΅" & B1:E1 & "π΅" & B2:E9 ) , "π΅")) This puts our data into the correct tall format: You can manually add the headings: Product, Region, Value It's more difficult than creating the pivot table, but not too bad if you build the formula in steps (what I call the "Onion Framework"). With the knowledge from last week and today's newsletter, you'll know which data shape to use for pivot tables or charts. And how to get to it if you don't have it yet. Never get stuck again! TemplateβGrab the template here >>β Click on "Use Template" in the top right corner to make your own copy. If you enjoyed this newsletter, please forward it to a friend who might enjoy it. Have a great week! Cheers, |
Get better at working with Google Sheets! Join 50,000 readers to get an actionable tip in your inbox every Monday.
Brought to you by: Hi Reader, Welcome to the Google Sheets Tips newsletter #362, your Monday morning espresso, in spreadsheet form! Last week I finished recording and editing all the video lessons for the new Modern Google Sheets course (woohoo!). I keep track of progress in a Google Sheet (where else of course!) using Tables and dropdown chips: (click to enlarge) I'm using Tables extensively now in my Sheets work. I find the benefits over plain dataβsuch as the dropdown chips, table...
Brought to you by: Hi Reader, Welcome to the Google Sheets Tips newsletter #361, your Monday morning espresso, in spreadsheet form! I'm excited to share today's tip with you. I came across it years ago but then forgot about it until today. And I'm kicking myself because it's so useful! I'm pretty sure I'll be using it on a daily basis now... read on to find out what it is. β News I.Last week, Google announced a significant enhancement to formula generation in Gemini for Sheets, making the...
Brought to you by: Hi Reader, Welcome to the Google Sheets Tips newsletter #360, your Monday morning espresso, in spreadsheet form! Last week I shared that I'm working on a new online course called Modern Google Sheets. I've now recorded 90% of the videos and edited about 65% of them so it's progressing well. After they're finished, I'll upload them to Teachable (the online school platform), prepare the templates, and add some challenge questions. I'm excited to get this course out into the...