search
HomeSoftware TutorialOffice Software4 Ways to Rearrange Data in Excel

  • Splitting Alternate Rows Into Two Columns
  • Turning Vertical Data Horizontal (Or Vice Versa)
  • Sorting Data
  • Splitting and Merging Data Using FlashFill

Excel is a great tool for presenting and analyzing information, but frustrations arise when the data isn't appropriately laid out. Re-typing the data into the preferred layout takes time and is certain to result in errors. Luckily, there are ways to rearrange data in just a few simple steps.

There are many different ways to reorganize data in Excel, but we've listed some of the most useful and efficient methods.

Splitting Alternate Rows Into Two Columns

In this example, we have a spreadsheet containing people's names and phone numbers in the cells below. You could end up in this situation if you've copied the data from another source (such as an email or a form) into your spreadsheet.

4 Ways to Rearrange Data in Excel

Excel is designed to display data in typical table form. In other words, each column should contain the same type of value (in our case, the person's name in column A and the phone numbers in column B), and each row should contain details for one variable (in our case, each person).

To achieve this, press Ctrl G to launch the Go To dialog box. If you have other data in your sheet, first select the data you want to rearrange. Then, click "Special."

4 Ways to Rearrange Data in Excel

Then, choose the data type you want to select. In our case, we first want to select any cell that is constantly text (the people's names), so we will click "Constants," and then uncheck "Numbers," "Logicals," and "Errors," leaving "Text" as the only checked data type.

4 Ways to Rearrange Data in Excel

Then click "OK."

You will see that only the text is selected.

4 Ways to Rearrange Data in Excel

Then, press Ctrl C to copy the text. Select the cell where you want to paste the first column of the new table you are creating, and press Ctrl V. You'll see that the data has handily pasted without gaps between each cell.

4 Ways to Rearrange Data in Excel

Repeat the process for the numbers, but this time, leave "Numbers" as the only checked constant data type.

4 Ways to Rearrange Data in Excel

Copy and paste the selected numbers into the column next to where you pasted the names, and then delete your original column by right-clicking the column header.

4 Ways to Rearrange Data in Excel

Using this method ensures the data remains in the same order, and you haven't had to use any formulas in the process. You can also format your table to give you the option to sort the data or easily add further rows and columns.

4 Ways to Rearrange Data in Excel

As you saw when you opened the Go To Special dialog box, there are other types of data you can select and paste into a new column.

Turning Vertical Data Horizontal (Or Vice Versa)

In the example below, we want to flip our table so that the dates run along the top and the people run down the side. Doing this manually would take a long time and inevitably lead to copying errors. Luckily, you can do this in just a few steps using Excel's transpose pasting function.

4 Ways to Rearrange Data in Excel

Many online forums and tutorials state that you cannot transpose a formatted table, but this isn't true. Indeed, the following process works regardless of whether or not your table is formatted using Excel's Format As Table option.

Select all the data in your table (including the header row), and press Ctrl C. Then, click the cell where you want the top-left value of the transposed data to be, and press Ctrl Alt V to launch the Paste Special dialog box.

Now, you need to choose how the data will be converted. For example, because we have dates in our table, we want to make sure the number formats are correctly transposed. If we don't pay attention to this, the dates will not transpose accurately. So, we have clicked the "Values and Number Formats" button. Then, check the "Transpose" checkbox, as this is the function that will switch your rows and columns for you. Finally, click "OK."

4 Ways to Rearrange Data in Excel

You will then see the data transposed in the position you selected. You can now delete the original table and format the new one to suit your needs.

4 Ways to Rearrange Data in Excel

Sorting Data

Whether you want to sort numbers (ascending or descending) or text (alphabetically), there are various ways to achieve this. Which option you choose will depend on whether you're sorting an isolated array (in other words, the column you're sorting is not connected to any other data), or a column in a table.

Sorting an Isolated Array

If you simply want to reorder an isolated array, select and right-click the data. In the menu that appears, hover over "Sort."

4 Ways to Rearrange Data in Excel

You'll then see several options. If your data is a series of numbers, you will have the option to sort them from smallest to largest or largest to smallest. Similarly, if you have a series of text, you can organize your data in alphabetical or reverse-alphabetical order.

Alternatively, with your isolated array selected, see the options available in the Sort And Filter group of the Data tab on the ribbon. Here, you can either click the "A-Z" or "Z-A" buttons to rearrange your data quickly, or click "Sort" to launch more options.

4 Ways to Rearrange Data in Excel

If you do click "Sort," you will see the following dialog box. If you wish, you could sort the data based on cell or font color instead of the cells' values.

4 Ways to Rearrange Data in Excel

Sorting a Column in a Table

If you use the above methods to sort a column in a table, the remaining columns will remain as they were, and your table will no longer read accurately. In this case, you need to add filter buttons to your table.

Select any cell within your table, and in the Data tab on the ribbon, click "Filter."

4 Ways to Rearrange Data in Excel

You will then see filter buttons, which you can click to rearrange a column with the knowledge that each row will remain congruent as you do this.

4 Ways to Rearrange Data in Excel

Formatting your data as a table using Excel's Format As Table function will cause filter buttons to appear automatically.

Splitting and Merging Data Using FlashFill

There may be occasions when you want to split data into two or more cells—for example, if you have more than one piece of information in a cell, splitting this data into two cells means you'll be able to use the sort function more effectively.

In this example, we want to split the names in column A so that the first names are in column B and the surnames are in column C.

4 Ways to Rearrange Data in Excel

Start by typing the first item in column B.

It's important that you create the FlashFill column directly next to the existing data—otherwise, the FlashFill won't work.

4 Ways to Rearrange Data in Excel

Then, select the cell directly underneath where you have typed the first entry, and press Ctrl E. This will automatically follow the same pattern that you started in the first cell of this column, which, in our case, is extracting the first word from column A.

4 Ways to Rearrange Data in Excel

You can then repeat the process in column C for the surnames, as this is directly adjacent to existing patterned data.

4 Ways to Rearrange Data in Excel

To finish, format your table, delete the original data, and add filter buttons to make your data more flexible.

4 Ways to Rearrange Data in Excel

Follow the same process to merge data together. So, if you have data in columns A and B that you want to merge in column C, start by typing the first merged value in column C, and then press Ctrl E to force Excel to follow the same pattern. You can also add further details when using FlashFill. For example, here, we have added the word "and" to the data.

4 Ways to Rearrange Data in Excel


It's no good having nicely arranged data within your spreadsheets if your worksheet tabs are disorganized. Fortunately, Excel also lets you sort your tabs into alphabetical order.

The above is the detailed content of 4 Ways to Rearrange Data in Excel. For more information, please follow other related articles on the PHP Chinese website!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
How to Use AI Function in Google SheetsHow to Use AI Function in Google SheetsMay 03, 2025 am 06:01 AM

Google Sheets' AI Function: A Powerful New Tool for Data Analysis Google Sheets now boasts a built-in AI function, powered by Gemini, eliminating the need for add-ons to leverage the power of language models directly within your spreadsheets. This f

Excel CONCATENATE function to combine strings, cells, columnsExcel CONCATENATE function to combine strings, cells, columnsApr 30, 2025 am 10:23 AM

This article explores various methods for combining text strings, numbers, and dates in Excel using the CONCATENATE function and the "&" operator. We'll cover formulas for joining individual cells, columns, and ranges, offering solutio

Merge and combine cells in Excel without losing dataMerge and combine cells in Excel without losing dataApr 30, 2025 am 09:43 AM

This tutorial explores various methods for efficiently merging cells in Excel, focusing on techniques to retain data when combining cells in Excel 365, 2021, 2019, 2016, 2013, 2010, and earlier versions. Often, Excel users need to consolidate two or

Excel: Compare two columns for matches and differencesExcel: Compare two columns for matches and differencesApr 30, 2025 am 09:22 AM

This tutorial explores various methods for comparing two or more columns in Excel to identify matches and differences. We'll cover row-by-row comparisons, comparing multiple columns for row matches, finding matches and differences across lists, high

Rounding in Excel: ROUND, ROUNDUP, ROUNDDOWN, FLOOR, CEILING functionsRounding in Excel: ROUND, ROUNDUP, ROUNDDOWN, FLOOR, CEILING functionsApr 30, 2025 am 09:18 AM

This tutorial explores Excel's rounding functions: ROUND, ROUNDUP, ROUNDDOWN, FLOOR, CEILING, MROUND, and others. It demonstrates how to round decimal numbers to integers or a specific number of decimal places, extract fractional parts, round to the

Consolidate in Excel: Merge multiple sheets into oneConsolidate in Excel: Merge multiple sheets into oneApr 29, 2025 am 10:04 AM

This tutorial explores various methods for combining Excel sheets, catering to different needs: consolidating data, merging sheets via data copying, or merging spreadsheets based on key columns. Many Excel users face the challenge of merging multipl

Calculate moving average in Excel: formulas and chartsCalculate moving average in Excel: formulas and chartsApr 29, 2025 am 09:47 AM

This tutorial shows you how to quickly calculate simple moving averages in Excel, using functions to determine moving averages over the last N days, weeks, months, or years, and how to add a moving average trendline to your charts. Previous articles

How to calculate average in Excel: formula examplesHow to calculate average in Excel: formula examplesApr 29, 2025 am 09:38 AM

This tutorial demonstrates various methods for calculating averages in Excel, including formula-based and formula-free approaches, with options for rounding results. Microsoft Excel offers several functions for averaging numerical data, and this gui

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

EditPlus Chinese cracked version

EditPlus Chinese cracked version

Small size, syntax highlighting, does not support code prompt function

SecLists

SecLists

SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment