Copy columns to rows excel

If you have a worksheet with data in columns that you need to rotate to rearrange it in rows, use the Transpose feature. With it, you can quickly switch data from columns to rows, or vice versa.

For example, if your data looks like this, with Sales Regions in the column headings and and Quarters along the left side:

Regional data in columns

The Transpose feature will rearrange the table such that the Quarters are showing in the column headings and the Sales Regions can be seen on the left, like this:

Regional data in rows

Note: If your data is in an Excel table, the Transpose feature won’t be available. You can convert the table to a range first, or you can use the TRANSPOSE function to rotate the rows and columns.

Here’s how to do it:

  1. Select the range of data you want to rearrange, including any row or column labels, and press Ctrl+C.

    Note: Ensure that you copy the data to do this, since using the Cut command or Ctrl+X won’t work.

  2. Choose a new location in the worksheet where you want to paste the transposed table, ensuring that there is plenty of room to paste your data. The new table that you paste there will entirely overwrite any data / formatting that’s already there.

    Right-click over the top-left cell of where you want to paste the transposed table, then choose Transpose Tranpose button image.

    Paste Options menu

  3. After rotating the data successfully, you can delete the original table and the data in the new table will remain intact.

Tips for transposing your data

  • If your data includes formulas, Excel automatically updates them to match the new placement. Verify these formulas use absolute references—if they don’t, you can switch between relative, absolute, and mixed references before you rotate the data.

  • If you want to rotate your data frequently to view it from different angles, consider creating a PivotTable so that you can quickly pivot your data by dragging fields from the Rows area to the Columns area (or vice versa) in the PivotTable Field List.

You can paste data as transposed data within your workbook. Transpose reorients the content of copied cells when pasting. Data in rows is pasted into columns and vice versa.

An example of Paste Transpose

Here’s how you can transpose cell content:

  1. Copy the cell range.

  2. Select the empty cells where you want to paste the transposed data.

  3. On the Home tab, click the Paste icon, and select Paste Transpose.

To Copy Paste columns and rows in Excel spreadsheet, follow these steps:

  1. Open an Excel spreadsheet on your computer.
  2. Select a row or column you want to copy or cut.
  3. Press the Ctrl+Cto copy or Ctrl+X to cut.
  4. Select the destination row or column where you want to paste it.
  5. Press the Ctrl+Vto paste the data.

Contents

  • 1 How do I convert multiple columns to rows in Excel?
  • 2 How do I paste a column into a row?
  • 3 How do I copy a row and paste a column?
  • 4 How do I convert multiple columns to one row?
  • 5 How do I paste vertical data horizontally in Excel?
  • 6 How do you copy and paste multiple rows in Excel?
  • 7 How do you copy paste a column in Excel?
  • 8 How do you copy a row in Excel?
  • 9 How do I convert multiple columns and rows to one column in Excel?
  • 10 How do I copy multiple columns into one column in Excel?
  • 11 How do you copy horizontally and paste vertically?
  • 12 How do I paste vertical data horizontally in sheets?
  • 13 How do I copy horizontal and paste vertically in sheets?
  • 14 How do I copy and paste alternate columns in Excel?
  • 15 Can you rotate a table in Excel?
  • 16 How do I switch columns and rows in Word chart?
  • 17 How do you repeat rows in Excel?
  • 18 How do you copy rows in Excel without overwriting?

How do I convert multiple columns to rows in Excel?

Highlight all of the columns that you want to unpivot into rows, then click on Unpivot Columns just above your data. Once you’ve clicked on Unpivot Columns, Excel will transform your columnar data into rows. Each row is a record of its own, ready to throw into a Pivot Table or work with in your datasheet.

How do I paste a column into a row?

Transpose (rotate) data from rows to columns or vice versa

  1. Select the range of data you want to rearrange, including any row or column labels, and press Ctrl+C.
  2. Choose a new location in the worksheet where you want to paste the transposed table, ensuring that there is plenty of room to paste your data.

How do I copy a row and paste a column?

Click the “Copy” button or press Ctrl+C to copy the selected cells. Click a blank cell where you want to copy the transposed data. The cell you select becomes the top, left corner of whatever you’re copying. Click the down arrow under the “Paste” button, and then click the “Transpose” button on the dropdown menu.

How do I convert multiple columns to one row?

Select and name the multiple column data table you want to convert to a single column. Use your cursor to highlight the data table and right-click on the highlighted table. Navigate to the “Name a Range” selection toward the bottom of the menu and click on it.

How do I paste vertical data horizontally in Excel?

Select the first cell of destination column, right click and select the Transpose (T) in the Paste Options section of the right-clicking menu. See below screenshot: And now the row is copied horizontally and pasted as one column vertically.

How do you copy and paste multiple rows in Excel?

To include multiple consecutive rows, click on the top row’s number, hold down the Shift key and then click on the bottom row number to highlight all of the rows in between. To include multiple non-consecutive rows, hold down the Ctrl key and then click on each row number you’d like to copy.

How do you copy paste a column in Excel?

How to Copy and Paste Columns in Excel

  1. Step 1: highlight the column or cells you want to copy and paste.
  2. Step 2: Press Ctrl + C to copy column.
  3. Step 3: Press Ctrl + V to paste.

How do you copy a row in Excel?

Do one of the following:

  1. To move rows or columns, on the Home tab, in the Clipboard group, click Cut . Keyboard shortcut: Press CTRL+X.
  2. To copy rows or columns, on the Home tab, in the Clipboard group, click Copy . Keyboard shortcut: Press CTRL+C.

How do I convert multiple columns and rows to one column in Excel?

After free installing Kutools for Excel, please do as below:

  1. Select the cross table you want to convert to list, click Kutools > Range > Transpose Table Dimensions.
  2. In Transpose Table Dimension dialog, check Cross table to list option on Transpose type section, select a cell to place the new format table.

How do I copy multiple columns into one column in Excel?

Combine data using the CONCAT function

  1. Select the cell where you want to put the combined data.
  2. Type =CONCAT(.
  3. Select the cell you want to combine first. Use commas to separate the cells you are combining and use quotation marks to add spaces, commas, or other text.
  4. Close the formula with a parenthesis and press Enter.

How do you copy horizontally and paste vertically?

How to Reconfigure a Horizontal Row to a Vertical Column in Excel

  1. Select all the rows or columns that you want to transpose.
  2. Click on a cell in an unused area of your worksheet.
  3. Click on the arrow below the “Paste” item and select “Transpose.” Excel pastes in your copied rows as columns or your copied columns as rows.

How do I paste vertical data horizontally in sheets?

To accomplish that maneuver, follow these steps:

  1. Select the vertical data.
  2. Type Ctrl C to copy.
  3. Click in the first cell of the horizontal range.
  4. Type Alt E, then type S to open the Paste Special dialog.
  5. Choose the Transpose checkbox as shown in Figure 1.
  6. Click OK.

How do I copy horizontal and paste vertically in sheets?

Here are the steps to transpose data in Google Sheets:

  1. Select the data that you want to transpose.
  2. Copy the data (right-click and select copy or use the keyboard shortcut Control + C)
  3. Select the cell where you want to get the transposed data.
  4. Right-click and within Paste Special, click on Paste Transpose.

How do I copy and paste alternate columns in Excel?

Please do as follows.

  1. Select a blank cell (here I select cell D2) in the new range you need to paste the copied data into, then enter formula =MOD(ROW(A1),2).
  2. Keep selecting cell D2, drag the Fill Handle down to the column cells.
  3. Then select cell D1, click Data > Filter to enable the Filter function.

Can you rotate a table in Excel?

Excel indeed has an easy way to transpose data.Highlight the range of cells you want to transpose and copy (Ctrl+C) it to the clipboard. Then right-click your mouse, click on Paste Special and the following menu appears with the Transpose box on the bottom: Click in the Transpose box and the table spins 90 degrees.

How do I switch columns and rows in Word chart?

Switch rows and columns in a chart

  1. Click the Edit Data button.
  2. Click the Select Data button.
  3. Now, you can click the Switch Row/Column button.

How do you repeat rows in Excel?

Title Rows

  1. Click the “Page Layout” tab, and select “Print Titles” from the Page Setup section of the ribbon.
  2. Click inside the box next to “Rows to Repeat at Top” in the Page Setup dialog box.
  3. Click in the worksheet on the row you want to repeat.
  4. Click “OK” to save the change and close the dialog box.

How do you copy rows in Excel without overwriting?

This will give you an option to shift cells right or down. If you cut cells, the context menu will have the option to “Insert Cut Cells” instead. Microsoft has a support article that describes these steps and other copy/paste options.

Convert Columns to Rows in Excel

Excel Columns to Rows (Table of Contents)

  • Columns to Rows in Excel
  • How to Convert Columns to Rows in Excel using Transpose?

Columns to Rows in Excel

In Excel, to convert any Columns to Rows, first select the column which you want to switch and copy the selected cells or columns. To proceed further, go to the cell where you want to paste the data. Then from the Paste option, which is under the Home menu tab, select the Transpose option. This will convert the selected Columns into Rows. You can also use the shortcut keys Alt + H + V + T, which will directly take us to the TRANSPOSE function.

Paste Special Option.

Paste Special Option

The shortcut key for paste special:

Once you have copied the range of cells that need to be transposed, click on Alt + E + S in a cell where you want to paste special a dialog box popup window with the transpose option.

shortcut key for paste special

How to Convert Columns to Rows in Excel using Transpose?

Converting data from column to row in excel is very simple and easy. Let’s understand the working of converting columns to rows by using some examples.

You can download this Convert Columns to Rows Excel Template here – Convert Columns to Rows Excel Template

Example #1

The below-mentioned Pharma sales table contains the medicine product code in column C (C10 to C16), quantity sold in column D (D10 to D16) & total sales value in column E (E10 to E16).

Example 1

Here we need to convert its orientation from columns to rows with the help of a paste special option in excel.

  • Select the whole table range, i.e. all the cells with the dataset in a spreadsheet.
  • Copy the selected cells by pressing Ctrl + C.

Columns to Rows Example 1-2

  • Select the cell where you want to paste this data set, i.e. G10.

Columns to Rows Example 1-3

  • When you enable right-click on the mouse, the paste option appears. You must then select the 4th option, i.e. Transpose (As mentioned in the below screenshot)

Columns to Rows Example 1-4

  • On selecting the transpose option, your dataset gets copied in that cell range starting from cell G10 to M112.

Columns to Rows Example 1-5

  • Apart from the above procedure, you can also use a shortcut key to convert columns to rows in excel.
  • Copy the selected cells by pressing Ctrl + C.
  • Select the cell where you need to copy this data set, i.e. G10.
  • Click on Alt + E + S, paste special dialog box popup window appears, in that select or click on the box of Transpose option, it will result or convert column data to rows data in excel.

Columns to Rows Example 1-6

Data that is copied is called source data, and when this source data is copied to other ranges, i.e. pasted data, which is referred to as transposed data.

Note: In the other direction where you are going to copy raw or source data, you have to ensure to select the same number of cells as the original set of cells so that there is no overlapping with the original dataset. In the above-mentioned example, there are 7-row cells that are arranged vertically. So when we copy this dataset to the horizontal direction, it should contain 7 column cells towards the other direction so that the overlapping does not occur with the original dataset.

Example #2

Sometimes, when you have huge number of columns, column data at the end is not visible, and it does not fit to screen. In this scenario, you can change its orientation from the current horizontal range to the vertical range with the help of the paste special option in excel.

  • The table contains months and their serial number (From columns C to W).

Example 2

  • Select the whole table range, i.e. all the cells with the dataset in a spreadsheet.
  • Copy the selected cells by pressing Ctrl + C.
  • Select the cell where you need to copy this data set, i.e. C24.
  • When you right-click on the mouse, the paste options appear, in that you have to select 4th option, i.e. Transpose (Below mentioned screenshot)

Columns to Rows Example 2-2

  • On selecting the transpose option, your dataset gets copied in that cell range starting from cell C24.

Columns to Rows Example 2-3

In the transposed data, all the data values are visible and clear as compared to the source data.

Disadvantages of using Paste special option:

  • Sometimes copy-paste option creates duplicates.
  • If you have used the Paste special option in excel to convert columns to rows, the transposed cells (or arrays) are not linked to each other with source data, and it does not get updated when you try to change data values in source data.

Example #3

Transpose function: It converts columns to rows and rows to columns in excel.

The syntax or formula for the Transpose function is:

Transpose Function

  • Array: It is a range of cells that you need to convert or change their orientation.

In the below example, the Pharma sales table contains medicine product code in column P (P7 to P12), and sales data in column Q (Q7 to Q12).

Example 3

Check out the number of rows & columns in the source data which you want to transpose.

i.e. Initially, count the number of rows and columns in your original source data (7 rows & 2 columns) which is vertically positioned. Now select the same number of blank cells, but in the other direction (Horizontal), i.e. (2 rows & 7 columns)

  • Prior to entering the formula, select the empty cells, i.e. from P15 to V16.

Columns to Rows Example 3-2

  • With the empty cells selected, Type the transpose formula in cell P15. i.e. = TRANSPOSE (P6:Q12).

Columns to Rows Example 3-3

  • Since the formula needs to be applied for the whole range, press Ctrl + Shift + Enter to make it an array formula.

Columns to Rows Example 3-4

Now you can check the dataset; here, columns are converted to rows with datasets.

Columns to Rows Example 3-5

Advantages of the TRANSPOSE function:

  • The main benefit or advantage of using the TRANSPOSE function is that transposed data or the rotated table retains the connection with the source table data, and whenever you change the source data, the transposed data also changes accordingly.

Things to Remember about Convert Columns to Rows in Excel

  • Paste special option can also be used for other tasks, i.e. Add, Subtract, Multiply, and Divide between datasets.
  • #VALUE error occurs while selecting the cells, i.e. If the number of columns and rows selected in transposed data are not equal to the rows and columns of the source data.

Recommended Articles

This has been a guide to Columns to Rows in Excel. Here we have discussed how to convert columns to rows in excel using transpose along with practical examples and a downloadable excel template. Transpose can help everyone to convert multiple Columns to Rows in excel easily and quickly. You can also go through our other suggested articles –

  1. COLUMNS Formula in Excel
  2. Add Rows in Excel Shortcut
  3. Column Header in Excel
  4. VBA Columns

Содержание

  1. Convert Columns to Rows in Excel
  2. How to Convert Columns to Rows in Excel?
  3. #1 Using Excel Ribbon – Convert Columns to Rows with copy and paste
  4. #2 Using Mouse – Converting Columns to Rows (Or Vise-Versa)
  5. Things to Remember
  6. Recommended Articles
  7. Move or copy cells, rows, and columns
  8. Excel — Copy columns to rows
  9. 2 Answers 2
  10. Transpose (rotate) data from rows to columns or vice versa
  11. Tips for transposing your data
  12. Need more help?
  13. Move or copy cells, rows, and columns

Convert Columns to Rows in Excel

How to Convert Columns to Rows in Excel?

There are two methods of doing this:

  1. Excel Ribbon Method
  2. Mouse Method

Let us take the below example to understand this process.

Table of contents

#1 Using Excel Ribbon – Convert Columns to Rows with copy and paste

We have the sales data location-wise.

This data is very useful for us, but we want to see this data in vertical order so that it will be easy to compare.

We must follow the below steps for converting columns to rows:

  1. We must select the whole data and go to the “HOME” tab.

Then, we must click on the “Copy” option under the “Clipboard” section. You may refer to the below screenshot. Else, press “CTRL +C” keys to copy the data.

Then, we must click on any blank cell where we want to see the data.

Next, we must click on the “Paste” option under the “Clipboard” section. You may refer to the below screenshot.

As a result, this will open a “Paste” dialog box. Then, choose the option “Transpose,” as shown below.

Consequently, it will convert the columns to rows and display the data as we want.

The result is shown below:

Now, we can put the filter and see the data differently.

#2 Using Mouse – Converting Columns to Rows (Or Vise-Versa)

Let us take another example to understand this process.

We have some student score data subject-wise.

Now, we have to convert this data from columns to rows.

Follow the below steps for doing this:

  • Step 1: We must first select the whole data and right-click. As a result, it will open a list of items. Now, we must click on the “Copy” option from the list. You may refer to the below screenshot.

  • Step 2: We need to click on any blank cell where we want to paste this data.
  • Step 3: Again, right-click and select Paste Special optionPaste Special OptionPaste special in Excel allows you to paste partial aspects of the data copied. There are several ways to paste special in Excel, including right-clicking on the target cell and selecting paste special, or using a shortcut such as CTRL+ALT+V or ALT+E+S.read more .

  • Step 4: Again, it will open a “Paste Special” dialog box.
  • Step 5: Then, click on the “Transpose option,” as shown in the below screenshot.
  • Step 6: Lastly, we must click on the “OK” button.

Now our data is converted from columns to rows. The final result is shown below:

In other ways, when we move our cursor or mouse on “Paste Special” option, it will again open a list of options as shown below:

Things to Remember

  • Converting columns to rows or vice-versa both methods also work when we want to convert a single column to a row or vice-versa.
  • This option is very handy and saves a lot of time while working.

Recommended Articles

This article is a guide to Convert Columns to Rows in Excel. We discuss switching columns to rows in Excel using the ribbon and mouse method, practical examples, and a downloadable Excel template. You may learn more about Excel from the following articles: –

Источник

Move or copy cells, rows, and columns

When you move or copy rows and columns, by default Excel moves or copies all data that they contain, including formulas and their resulting values, comments, cell formats, and hidden cells.

When you copy cells that contain a formula, the relative cell references are not adjusted. Therefore, the contents of cells and of any cells that point to them might display the #REF! error value. If that happens, you can adjust the references manually. For more information, see Detect errors in formulas.

You can use the Cut command or Copy command to move or copy selected cells, rows, and columns, but you can also move or copy them by using the mouse.

By default, Excel displays the Paste Options button. If you need to redisplay it, go to Advanced in Excel Options. For more information, see Advanced options.

Select the cell, row, or column that you want to move or copy.

Do one of the following:

To move rows or columns, on the Home tab, in the Clipboard group, click Cut or press CTRL+X.

To copy rows or columns, on the Home tab, in the Clipboard group, click Copy or press CTRL+C.

Right-click a row or column below or to the right of where you want to move or copy your selection, and then do one of the following:

When you are moving rows or columns, click Insert Cut Cells.

When you are copying rows or columns, click Insert Copied Cells.

Tip: To move or copy a selection to a different worksheet or workbook, click another worksheet tab or switch to another workbook, and then select the upper-left cell of the paste area.

Note: Excel displays an animated moving border around cells that were cut or copied. To cancel a moving border, press Esc.

By default, drag-and-drop editing is turned on so that you can use the mouse to move and copy cells.

Select the row or column that you want to move or copy.

Do one of the following:

Cut and replace Point to the border of the selection. When the pointer becomes a move pointer , drag the rows or columns to another location. Excel warns you if you are going to replace a column. Press Cancel to avoid replacing.

Copy and replace Hold down CTRL while you point to the border of the selection. When the pointer becomes a copy pointer , drag the rows or columns to another location. Excel doesn’t warn you if you are going to replace a column. Press CTRL+Z if you don’t want to replace a row or column.

Cut and insert Hold down SHIFT while you point to the border of the selection. When the pointer becomes a move pointer , drag the rows or columns to another location.

Copy and insert Hold down SHIFT and CTRL while you point to the border of the selection. When the pointer becomes a move pointer , drag the rows or columns to another location.

Note: Make sure that you hold down CTRL or SHIFT during the drag-and-drop operation. If you release CTRL or SHIFT before you release the mouse button, you will move the rows or columns instead of copying them.

Note: You cannot move or copy nonadjacent rows and columns by using the mouse.

Источник

Excel — Copy columns to rows

I have 3 columns in a sheet in excel as below

I need the output in the below format on a SEPARATE SHEET

I’m fine with either VB script or using just excel features. Could I please get some help?

2 Answers 2

Try this macro. Place the macro in a regular code module (Insert > Module). Adjust the ranges to suit your situation.

If you’re not going to do this on a regular basis, here’s a simple solution.

I don’t have access to MS-Excel so I cannot give you the exact answer. But I hope this helps.

  1. Add a new column with the concatenate function to the right of the table for example, to merge cells b1 and c1, use =Concatenate(b1,c1) and keep this result in cell D1. Do a copy-paste of the function for the other rows as well.
  2. Copy your selection to a new worksheet where you want the result.
  3. Use paste special to only paste the values of copied cells without forumulas. This ensures that it won’t reference the original cells or change relatively.
  4. Use the transpose function to change the resulting contents like your final output while pasting the data. Similar one here.

If you need to do this regularly, this method is not suitable. You’ll be better off with a VBA script. But it’s been a very long time since I worked on Excel so I cannot help you there.

Источник

Transpose (rotate) data from rows to columns or vice versa

If you have a worksheet with data in columns that you need to rotate to rearrange it in rows, use the Transpose feature. With it, you can quickly switch data from columns to rows, or vice versa.

For example, if your data looks like this, with Sales Regions in the column headings and and Quarters along the left side:

The Transpose feature will rearrange the table such that the Quarters are showing in the column headings and the Sales Regions can be seen on the left, like this:

Note: If your data is in an Excel table, the Transpose feature won’t be available. You can convert the table to a range first, or you can use the TRANSPOSE function to rotate the rows and columns.

Here’s how to do it:

Select the range of data you want to rearrange, including any row or column labels, and press Ctrl+C.

Note: Ensure that you copy the data to do this, since using the Cut command or Ctrl+X won’t work.

Choose a new location in the worksheet where you want to paste the transposed table, ensuring that there is plenty of room to paste your data. The new table that you paste there will entirely overwrite any data / formatting that’s already there.

Right-click over the top-left cell of where you want to paste the transposed table, then choose Transpose .

After rotating the data successfully, you can delete the original table and the data in the new table will remain intact.

Tips for transposing your data

If your data includes formulas, Excel automatically updates them to match the new placement. Verify these formulas use absolute references—if they don’t, you can switch between relative, absolute, and mixed references before you rotate the data.

If you want to rotate your data frequently to view it from different angles, consider creating a PivotTable so that you can quickly pivot your data by dragging fields from the Rows area to the Columns area (or vice versa) in the PivotTable Field List.

You can paste data as transposed data within your workbook. Transpose reorients the content of copied cells when pasting. Data in rows is pasted into columns and vice versa.

Here’s how you can transpose cell content:

Copy the cell range.

Select the empty cells where you want to paste the transposed data.

On the Home tab, click the Paste icon, and select Paste Transpose.

Need more help?

You can always ask an expert in the Excel Tech Community or get support in the Answers community.

Источник

Move or copy cells, rows, and columns

When you move or copy rows and columns, by default Excel moves or copies all data that they contain, including formulas and their resulting values, comments, cell formats, and hidden cells.

When you copy cells that contain a formula, the relative cell references are not adjusted. Therefore, the contents of cells and of any cells that point to them might display the #REF! error value. If that happens, you can adjust the references manually. For more information, see Detect errors in formulas.

You can use the Cut command or Copy command to move or copy selected cells, rows, and columns, but you can also move or copy them by using the mouse.

By default, Excel displays the Paste Options button. If you need to redisplay it, go to Advanced in Excel Options. For more information, see Advanced options.

Select the cell, row, or column that you want to move or copy.

Do one of the following:

To move rows or columns, on the Home tab, in the Clipboard group, click Cut or press CTRL+X.

To copy rows or columns, on the Home tab, in the Clipboard group, click Copy or press CTRL+C.

Right-click a row or column below or to the right of where you want to move or copy your selection, and then do one of the following:

When you are moving rows or columns, click Insert Cut Cells.

When you are copying rows or columns, click Insert Copied Cells.

Tip: To move or copy a selection to a different worksheet or workbook, click another worksheet tab or switch to another workbook, and then select the upper-left cell of the paste area.

Note: Excel displays an animated moving border around cells that were cut or copied. To cancel a moving border, press Esc.

By default, drag-and-drop editing is turned on so that you can use the mouse to move and copy cells.

Select the row or column that you want to move or copy.

Do one of the following:

Cut and replace Point to the border of the selection. When the pointer becomes a move pointer , drag the rows or columns to another location. Excel warns you if you are going to replace a column. Press Cancel to avoid replacing.

Copy and replace Hold down CTRL while you point to the border of the selection. When the pointer becomes a copy pointer , drag the rows or columns to another location. Excel doesn’t warn you if you are going to replace a column. Press CTRL+Z if you don’t want to replace a row or column.

Cut and insert Hold down SHIFT while you point to the border of the selection. When the pointer becomes a move pointer , drag the rows or columns to another location.

Copy and insert Hold down SHIFT and CTRL while you point to the border of the selection. When the pointer becomes a move pointer , drag the rows or columns to another location.

Note: Make sure that you hold down CTRL or SHIFT during the drag-and-drop operation. If you release CTRL or SHIFT before you release the mouse button, you will move the rows or columns instead of copying them.

Note: You cannot move or copy nonadjacent rows and columns by using the mouse.

Источник

There are two methods of doing this:

  1. Excel Ribbon Method
  2. Mouse Method

Let us take the below example to understand this process.

Table of contents
  • How to Convert Columns to Rows in Excel?
    • #1 Using Excel Ribbon – Convert Columns to Rows with copy and paste
    • #2 Using Mouse – Converting Columns to Rows (Or Vise-Versa)
    • Things to Remember
    • Recommended Articles

You can download this Convert Columns to Rows Excel Template here – Convert Columns to Rows Excel Template

#1 Using Excel Ribbon – Convert Columns to Rows with copy and paste

We have the sales data location-wise.

Convert Columns To Rows Example 1

This data is very useful for us, but we want to see this data in vertical order so that it will be easy to compare.

We must follow the below steps for converting columns to rows:

  1. We must select the whole data and go to the “HOME” tab.
  2. Then, we must click on the “Copy” option under the “Clipboard” section. You may refer to the below screenshot. Else, press “CTRL +C” keys to copy the data.

    Convert Columns To Rows Example 1-1

  3. Then, we must click on any blank cell where we want to see the data.
  4. Next, we must click on the “Paste” option under the “Clipboard” section. You may refer to the below screenshot.

    Convert Columns To Rows Example 1-2

  5. As a result, this will open a “Paste” dialog box. Then, choose the option “Transpose,” as shown below.

    Convert Columns To Rows Example 1-3

  6. Consequently, it will convert the columns to rows and display the data as we want.

    The result is shown below:

    Convert Columns To Rows Example 1-4

    Now, we can put the filter and see the data differently.

#2 Using Mouse – Converting Columns to Rows (Or Vise-Versa)

Let us take another example to understand this process.

We have some student score data subject-wise.

Example 2

Now, we have to convert this data from columns to rows.

Follow the below steps for doing this:

  • Step 1: We must first select the whole data and right-click. As a result, it will open a list of items. Now, we must click on the “Copy” option from the list. You may refer to the below screenshot.

Example 2-1

  • Step 2: We need to click on any blank cell where we want to paste this data.
  • Step 3: Again, right-click and select Paste Special optionPaste special in Excel allows you to paste partial aspects of the data copied. There are several ways to paste special in Excel, including right-clicking on the target cell and selecting paste special, or using a shortcut such as CTRL+ALT+V or ALT+E+S.read more.

Example 2-2

  • Step 4: Again, it will open a “Paste Special” dialog box.
  • Step 5: Then, click on the “Transpose option,” as shown in the below screenshot.
  • Step 6: Lastly, we must click on the “OK” button.

Example 2-3

Now our data is converted from columns to rows. The final result is shown below:

Example 2-4

In other ways, when we move our cursor or mouse on “Paste Special” option, it will again open a list of options as shown below:

Example 2-5

Things to Remember

  • Converting columns to rows or vice-versa both methods also work when we want to convert a single column to a row or vice-versa.
  • This option is very handy and saves a lot of time while working.

Recommended Articles

This article is a guide to Convert Columns to Rows in Excel. We discuss switching columns to rows in Excel using the ribbon and mouse method, practical examples, and a downloadable Excel template. You may learn more about Excel from the following articles: –

  • Count Rows in Excel
  • How to Convert Excel to CSV?
  • Convert Text to Columns in Excel
  • Row Limit in Excel
  • MMULT in Excel

Reader Interactions

We all look at data differently. For example, some people create Microsoft Excel spreadsheets with the main fields horizontal. Others prefer data flipped vertically in columns. Sometimes these preferences lead to a scenario where you want to switch data. In this tutorial, I’ll show how to switch rows and columns using the Transpose feature.

The Layout Problem

I was recently given a large Microsoft Excel spreadsheet that contained vendor evaluation information. The information was useful, but I couldn’t use tools like Auto Filter because of the way the data was organized. I would also have issues if I needed to import the original source table into a database. A simple example is shown below.

Excel sheet before converting columns to rows.

Excel Spreadsheet Needing to Swap Columns & Rows

Instead, I want to have the Company names displayed vertically in Column A and the Data Attributes displayed horizontally in Row 1. This would make it easier for me to do the analysis. For example, I can’t easily filter for California vendors with the original table.

What is Excel’s Transpose Function

In simple terms, the transpose feature changes your columns’ orientation (vertical range) and rows (horizontal range). My original data rows would become columns, and my columns would become rows. So this fixes my layout problem above without me having to retype my original data. And the system would adjust for column labels.

The transpose function is pretty versatile. For example, you can use the feature in Excel formulas or with paste options. However, there are some differences based on which method you use.

Convert Columns to Rows Using Paste Special

The steps outlined below were done using Microsoft Office 365, but recent Microsoft Excel versions will work.

  1. Open the spreadsheet you need to change. You may also download the example sheet at the end of this tutorial.
  2. Click the first cell in your cell range such as A1.
  3. Shift-click the last cell of the range. Your data set should highlight.
  4. From the Home tab, select Copy or type Ctrl + c.

Copy existing Excel data range.

Copying the current Excel data
  1. Select the new cell where you would like to copy your transposed data.
  2. Right-click in that cell and select the Transpose icon from the Paste Options.

Selecting Transpose icon from Paste Options.

Choose the Transpose option

As you hover over the Paste options, you can see the data layout change.

You should now see Excel switched the columns and rows. You can resize your columns to suit your needs.

These two data sets are independent. You can delete cells from the top set and it will not impact the transposed set.

Transposed data under original.

Transposed data under original.

When using this method, your original formatting is maintained. For example, if I added a yellow background to my original cells B1:G1, the same background color would be applied. The same is true if I used red text on cell E:5.

Use Transpose Function in a Formula

As I mentioned, Excel has multiple ways for you to switch columns to rows or vice versa. This second way utilizes a formula and array. The result is the same except your original data, and the new transposed data are linked. As a result, you may lose some of your original formatting. For example, colored text and styles came across, but not cell fill colors.

  1. Open your Excel sheet.
  2. Click a blank cell where you want your converted data. I’m using A7.
  3. Type =transpose.

Start of transpose formula in cell A7.

Typing transpose formula

Notice how Excel provides a tooltip showing for Transpose – “Converts a vertical range of cells to a horizontal range and vice versa“.

  1. Finish the formula by adding a ( and highlighting the cell range we wish to swap.
  2. Type ) to close the range.

Highlighted columns and rows to transpose.

Transpose formula and range
  1. Press Enter.

If you’re not using Microsoft 365, you’ll probably need to press CTRL + SHIFT + Enter

Differences in Transpose Options

While these two methods produce similar results, there are differences. In the first paste method, whatever action I take on a cell is independent of the transposed version. I could delete the original values, and nothing would happen to the columns I swapped.

In contrast, the Transpose formula version is tethered to the original data. So, for example, if I change the value in B2 from 1200 to 1500, the new value will automatically update in B8. However, the reverse isn’t true. If I change any transposed cells, the original set will not change. Instead, I will get a #SPILL error, and my transposed data will disappear.

#SPILL error and missing data

Error when changing transposed cell

Transpose Formula & Blank Cells

Another difference with using the Transpose formula is it will convert blank cells to “0”s.

Transposed section with highlighted 0 cells.

Transpose converted blanks to 0’s

The fix for this quirk is to use an IF statement to the formula that keeps the blanks cells as blanks.

=TRANSPOSE(IF(A1:G5="","",A1:G5))

Alternatively, you could do a search and replace on the zeros.

Now that we’ve shown you how to transpose data in Excel, try playing around with the practice worksheet below. You’ll be swapping your rows and columns in Excel in no time. And while you likely work with multiple rows, you can convert one Excel column to row.

Show Me How Video

Click the image below to see a short video showing how to switch columns and rows without a formula.

Tutorial Resources

Hand-picked Tutorials

  • Beginner’s Guide to XLOOKUP
  • How to Use Excel VLOOKUP
  • How to Use Excel Auto Filter
  • How to Extract Text from a Cell in Excel
  • How to Highlight Cells in Excel with Conditional Formatting

Microsoft Excel is nothing but using data in columns and rows. When you are preparing data inExcel, sometime it is necessary to convert data in a column to a row and vice versa. This article explains step by step instructions on how to convert a column of an Excel sheet into a row. This is useful especially when you have data in table format and struggling to convert the columns of the table to rows along with the complete data. If you are frustrated with slow Excel, learn more on how to fix slow Excel and speed up data processing.

Example Data in a Table

Assume you have data in a table in an excel sheet as shown in the picture beside. Now you want to convert the complete table from columns to rows format. Copying and pasting each cell is a time consuming and error prone process.

Sample Table for Conversion
Sample Table for Conversion

Using Transpose Function

Microsoft Excel offers a simple functionality called “Transpose” to do such a difficult task in a few clicks. Follow the below steps to understand the transpose functions.

  • Select the complete table data and copy to clipboard using Ctl+C shortcut.
  • Right click on the cell where you want to paste it.
  • Click on the option “Paste Special” from the context menu as shown in the picture below.
Paste Special in Excel
Paste Special in Excel
  • A new popup window will open as shown below.
  • Click on the checkbox “Transpose” and then click on “OK” button.
Transpose Option in Excel
Transpose Option in Excel

Now all your table data is transposed from rows to column format. This can be used for a single row or column to a big table of data spread into multiple columns and rows.

Converted - Rows to Column
Converted – Rows to Column

Directly Using Paste Special

When you right click on a cell, you also can click on the “Arrow” mark next to “Past Special” to see complete paste options including “Transpose” function as shown in the below picture.

All Paste Special Options
All Paste Special Options

Using Paste Options Control

Whenever you paste content in a cell you shall notice a small button appearing as “Paste Options (Ctrl)”. Once you used “Transpose” function, it will appear automatically in the paste options as a frequently used option. Hence from next time onwards, just copy the table and paste it in a cell where you want and click on the “Paste Options (Ctrl)” to use “Transpose” option.

Transpose Function as Default
Transpose Function as Default

Microsoft Excel for Mac

Similar to Windows version, you can use transpose function in Microsoft Excel for Mac also. After copying the content, simply right click on the cell where you want to paste and choose “Transpose” option. This will paste the content by converting rows into columns.

Using Paste Special in Mac Excel
Using Paste Special in Mac Excel

Alternatively, you can choose “Paste Special…” to open the dialog box. Here, you can check the “Transpose” option and click “OK” to paste the transposed data.

Transpose in Mac Excel
Transpose in Mac Excel

You can also press “Control + Command + V” keyboard shortcuts to open paste special dialog box.

I have 3 columns in a sheet in excel as below

RAW DATA

I need the output in the below format on a SEPARATE SHEET

OUTPUT

I’m fine with either VB script or using just excel features. Could I please get some help?

Community's user avatar

asked Dec 29, 2015 at 6:08

usert4jju7's user avatar

4

Try this macro. Place the macro in a regular code module (Insert > Module). Adjust the ranges to suit your situation.

Sub rearrange()
Dim cel As Range, tgt As Range

Set cel = ActiveSheet.Range("A1")
Set tgt = ActiveSheet.Range("D1")
Do While Len(cel) > 0
    tgt = cel
    tgt.Offset(1, 0) = cel.Offset(0, 1) & cel.Offset(0, 2)
    Set cel = cel.Offset(1, 0)
    Set tgt = tgt.Offset(2, 0)
Loop
ActiveSheet.Range("A:C").Delete

End Sub

answered Dec 29, 2015 at 6:52

teylyn's user avatar

teylynteylyn

34.1k4 gold badges52 silver badges72 bronze badges

0

If you’re not going to do this on a regular basis, here’s a simple solution.

I don’t have access to MS-Excel so I cannot give you the exact answer. But I hope this helps.

Steps:

  1. Add a new column with the concatenate function to the right of the table for example, to merge cells b1 and c1, use =Concatenate(b1,c1) and keep this result in cell D1. Do a copy-paste of the function for the other rows as well.
  2. Copy your selection to a new worksheet where you want the result.
  3. Use paste special to only paste the values of copied cells without forumulas. This ensures that it won’t reference the original cells or change relatively.
  4. Use the transpose function to change the resulting contents like your final output while pasting the data. Similar one here.

If you need to do this regularly, this method is not suitable. You’ll be better off with a VBA script. But it’s been a very long time since I worked on Excel so I cannot help you there.

Community's user avatar

answered Dec 29, 2015 at 6:36

itsols's user avatar

itsolsitsols

5,3267 gold badges52 silver badges92 bronze badges

2

You may be curious how it is going to help if we take data that is organised in many columns and turn it into rows. It is preferred, in general, for each row of data to be analogous to a record and to contain a single data point. The columnar data may be a mess, with various properties scattered across several columns. Different people will look at the data in different ways. For instance, some people construct spreadsheets in Excel with the primary fields arranged in a horizontal fashion.

Some people prefer to have the data reversed horizontally across columns. Because of these preferences, you may find yourself in a situation where you need to switch the data in Excel.

Columns to rows in excel

In Excel, to convert any Columns to Rows, first select the column which we want to switch and copy the selected cells or columns. To proceed further, go to the cell where we want to paste the data, then from the Paste option, which is under the Home menu tab, select the Transpose option. This will convert the selected Columns into Rows. We can also use the short cut keys Alt + H + V + T, which will directly take us to the TRANSPOSE function.

Let’s understand step by step with an example.

Step 1

In our example, we have employee’s name, salary, bonus, and total salary in an Excel sheet in columnar format.

Step 2

The transpose function will switch the vertical range of your columns and the horizontal range of your rows.

Here, select all the ranges of column to which you want to transpose and copy them by pressing CTRL+C.

Step 3

Now select a blank cell and right click there.

When you enable the right click button on the mouse, the option to paste will show from this menu, you will need to choose the fourth option, which is «Transpose.» See the following image.

Step 4

When you select the transpose option, a copy of your dataset is stored in that particular cell.

Using Transpose Function

Columns can be directly converted into rows by using the TRANSPOSE function, and vice versa. No matter how many columns there are or how wide the range is, we are able to use the TRANSPOSE function.

Step 1

You can copy the chosen cells by pressing the «Ctrl + C» keys simultaneously.

Choose the cell that you need to copy this data set into.

Step 2

Now Select the cell in which you want to arrange the data set. Then add the following formula in formula bar.

=TRANSPOSE(A1:D9) 

See the following image.

Step 3

When you press the ENTER key, all of the columns will quickly transform into rows.

Conclusion

In this tutorial, we explained in detail how you can take multiple columns in Excel and transform them into rows.

Понравилась статья? Поделить с друзьями:
  • Copy color in word
  • Copy code to word
  • Copy cell to clipboard excel
  • Copy as html from word
  • Copy and pasting cells in excel