How to Make Horizontal Data Vertical in Google Sheets
Wrangling data into the right shape is half the battle for any report. While it's easy to enter data horizontally across rows, most analysis tools, like pivot tables or charting wizards, prefer data to be structured vertically in columns. This article will show you exactly how to flip, or transpose, your data from horizontal to vertical in Google Sheets, from a simple copy-paste method to more powerful, dynamic formulas.
Why Would You Need to Make Data Vertical?
Before diving into the "how," let's quickly cover the "why." Flipping data from a horizontal layout (rows) to a vertical one (columns) isn't just about personal preference, it's often a requirement for effective data analysis. Vertically structured data is considered "tidy," meaning each row is an observation, and each column is a variable. This format is what most data tools are designed to work with.
Here are a few common scenarios where you'll need to transpose data:
- Creating Charts: Google Sheets’ chart builder works best when your series data is in a single column. If your monthly sales figures are spread across a single row, you'll need to make them vertical to create a proper time-series line chart.
- Building Pivot Tables: Pivot tables are designed to summarize thousands of rows of data. They require a columnar structure to function correctly.
- Importing to Other Systems: If you're exporting your Google Sheet to a database, a CRM, or a business intelligence tool, these systems almost always require a standardized vertical format.
- Easier Reading and Filtering: A long list is often easier to scroll through, filter, and read than an endlessly wide table that requires horizontal scrolling.
Now, let's get into the practical methods for getting it done.
Method 1: The Quick and Easy Way with Paste Special (Transpose)
If you have a one-time need to flip your data and don't expect the original data to change, the simplest method is using Google Sheets’ built-in "Paste Special" feature. This is a static method - meaning if you update the source data, your new vertical data will not update automatically.
This is perfect for a quick, one-off report.
Step-by-Step Instructions:
- Select Your Data: Highlight the horizontal data you want to make vertical. Make sure to include both the headers and the values. For this example, let's say your data is in cells B2:E3.
- Copy the Data: Copy the selected cells using
Ctrl+Con a PC orCmd+Con a Mac. You'll see a dotted line appear around your selection. - Select a Destination: Click on a single cell where you want the top-left corner of your new vertical data to appear. Make sure you have enough empty space below and to the right so you don't overwrite existing data. We’ll choose cell B5.
- Use Paste Special: Right-click on your chosen destination cell (B5). From the menu, navigate to Paste special > Transposed.
- Mission Accomplished: Your data is now vertical! The horizontal rows have been flipped into vertical columns.
Pros:
- Insanely fast, simple, and preserves existing formatting.
Cons:
- Creates a static copy. If you change a number in the original horizontal data set, you will have to repeat this entire process to see the update in the vertical version.
Method 2: The Dynamic Method with the TRANSPOSE Function
What if your source data changes frequently? Manually copy-pasting every time is inefficient and prone to errors. This is where the TRANSPOSE function comes in. It creates a live, dynamic link between your horizontal data and a new vertical version.
The syntax is incredibly simple:
=TRANSPOSE(range)
You just give it the range of your horizontal data, and it will output a vertical mirror image.
Step-by-Step Instructions:
- Select Your Destination Cell: Click on a single empty cell where you want your transposed data to begin. For our example, we'll use cell G2.
- Start the Formula: Type
=TRANSPOSE(into the formula bar. - Select the Source Range: While the formula is open, click and drag to highlight your entire horizontal data range (e.g., B2:E3). Google Sheets will automatically add it to your formula.
- Close and Enter: Close the parenthesis
)and press Enter. The complete formula will look like this:=TRANSPOSE(B2:E3) - Dynamic Results: Your data will instantly appear in a vertical format. The best part? If you now change any value in the original source range (B2:E3), the new vertical table created by the formula will update automatically.
Important Tip: The #REF! Error
One common issue you might encounter is the #REF! error. This typically happens because your TRANSPOSE formula is trying to output data into cells that already contain something. The error message usually says, "Array result was not expanded because it would overwrite data." To fix this, simply clear any data in the cells that the formula needs to use, and it will populate correctly.
Method 3: The Advanced Formula for Complex "Unpivoting"
Sometimes, your data isn't just a simple table to flip. A common scenario, especially in marketing or sales analytics, is having data structured as a "crosstab" or "wide format" table. For example, you might have sales data where each column is a different month or quarter:
For most analysis, you don't want this. You want a "long format" table like this:
- Column 1: Rep Name
- Column 2: Quarter
- Column 3: Sales
Achieving this requires a more advanced formula that combines several functions. While it looks intimidating, it powerfully automates a very common data-cleaning task.
The Unpivot Formula:
We'll use a combination of QUERY, ARRAYFORMULA, SPLIT, and FLATTEN.
Let's assume your data in the image above is in the range A1:D4 (with headers in row 1).
In an empty cell, paste this formula:
=ARRAYFORMULA(QUERY(SPLIT(FLATTEN(B2:D4&"|"&A2:A4&"|"&B1:D1),"|",false),"SELECT Col2, Col3, Col1"))
How This Formula Works, Piece by Piece:
B2:D4&"|"&A2:A4&"|"&B1:D1: This is the core engine. It combines three pieces of information for every sales value: the sales amount itself (from B2:D4), the rep's name (from A2:A4), and the quarter (from B1:D1). It uses a pipe symbol|to separate them into a single string. For cell B2, it would create "10000|Ana|Q1".FLATTEN(...): This function takes the grid of concatenated strings that we just created and "flattens" it into a single vertical column.SPLIT(...,"|",false): Now that we have one long list, this function splits each entry back apart wherever it finds a pipe symbol"|", creating three clean columns: Sales, Rep Name, and Quarter (but in that order).QUERY(...,"SELECT Col2, Col3, Col1"): TheQUERYfunction acts like a mini-database language. Here, we're using it to rearrange our new columns into the desired order: Rep Name (Col2), Quarter (Col3), and Sales (Col1).ARRAYFORMULA(...): This is the wrapper that tells Google Sheets to perform the operations inside not just on a single cell, but on the entire range of cells at once.
Once you've set up a formula like this, you can just paste in new raw data, and your perfectly formatted table will update automatically. Add a new rep or a new quarter, adjust the ranges in the formula, and it will continue to work.
Final Thoughts
Knowing how to transform data from a horizontal layout to a vertical one is a fundamental skill for anyone working in Google Sheets. You can use a simple copy-paste for quick, static jobs, lean on the TRANSPOSE function for dynamic reports, or master advanced formulas to automate the full unpivoting of complex datasets, saving yourself hours of manual work.
We know tedious spreadsheet tasks and manual data prep are a huge time sink. We built Graphed to help you skip right to the insights. You can connect your marketing and sales platforms (like Google Analytics, Shopify, or Salesforce) in just a few clicks. From there, you just ask questions in plain English, like "Show me a chart of Shopify sales by campaign for the last 90 days," and your report gets built instantly - no pivoting or transposing required.
Related Articles
Add-Ons for Google Analytics
Discover the best add-ons for Google Analytics to automate reporting and enhance data visualization. Simplify your analytics workflow effortlessly.
Looker Studio vs Metabase: Which BI Tool Actually Fits Your Team?
Looker Studio and Metabase both help you turn raw data into dashboards, but they take completely different approaches. This guide breaks down where each tool fits, what they are good at, and which one matches your actual workflow.
Looker Studio vs Grafana: Which Data Visualization Tool Is Right for You?
Looker Studio and Grafana are both free data visualization tools, but they solve very different problems. This guide breaks down how they differ, where each shines, and how to decide which fits your needs.

