Tech Tips

제목How to flip data in Excel2024-07-02 20:06
작성자 Level 10

https://www.ablebits.com/office-addins-blog/flip-data-columns-rows-excel/#fill-column-tip 

Flip data in Excel vertically

With just a little creativity, you can work out a handful of different ways to flip a column in Excel: by using inbuilt features, formulas, VBA or special tools. The detailed steps on each method follow below.

How to flip a column in Excel

The reverse the order of data in a column vertically, perform these steps:

  1. Add a helper column next to the column you want to flip and populate that column with a sequence of numbers, starting with 1. This tip shows how to have it done automatically.
  2. Sort the column of numbers in descending order. For this, select any cell in the helper column, go to the Data tab > Sort & Filter group, and click the Sort Largest to Smallest button (ZA).

To flip a column in Excel, sort a column with numbers next to it.

As shown in the screenshot below, this will sort not only the numbers in column B, but also the original items in column A, reversing the order of rows:

The order of data in the original column is reversed.

Now you can safely delete the helper column since you do not need it any longer.

Tip: How to quickly fill a column with serial numbers

The fastest way to populate a column with a sequence of numbers is by using the Excel AutoFill feature:

  • Type 1 into the first cell and 2 into the second cell (cells B2 and B3 in the screenshot below).
  • Select the cells where you've just entered the numbers and double-click the lower right corner of the selection.AutoFill a column with serial numbers.

That's it! Excel will autofill the column with serial numbers up to the last cell with data in the adjacent column.

How to flip a table in Excel

The above method also works for reversing the data order in multiple columns:

Flipping a table in Excel

Sometimes (most often when you select the whole column of numbers prior to sorting) Excel might display the Sort Warning dialog. In this case, check the Expand the selection option, and then click the Sort button.

Expand the selection.

Tip. If you'd like to switch rows and columns, use the Excel TRANSPOSE function or other ways to transpose data in Excel.

댓글
자동등록방지
(자동등록방지 숫자를 입력해 주세요)