Tip: Other languages are Google-Translated. You can visit the English version of this link.
Log in
x
or
x
x
Register
x

or

How to convert vector / single row or column to matrix in Excel?

How could you convert a single row or column to a range of matrix in Excel? Copy and paste them one by one will waste a lot of time, in this article, I will talk about some quick tricks for you to solve this job.

Convert vector / single row or column to matrix with formulas

Convert vector / single row or column to matrix with Kutools for Excel


Transform Range: (Convert one column / row to multiple columns and rows and vice versa)

With Kutools for Excel’s Transform Range feature, you can quickly convert a range of cells to a single row or column, you can also convert a single row or column to a range of cells.

doc convert vector to matrix 8

Kutools for Excel: with more than 200 handy Excel add-ins, free to try with no limitation in 60 days. Download and free trial Now!



You can apply the following formulas to convert a row or a column to matrix, please do as follows:

Convert a single column to matrix:

Supposing, I have a column of values C1:C20, and now, I want to convert this column to a matrix with four rows and five columns (4×5), please do as follows:

1. Enter this formula into a blank cell, F1 for example: =OFFSET($C$1:$C$20,COLUMN()-COLUMN($F$1)+((ROW()-ROW($F$1))*(ROWS($C$1:$C$20)/4)),0,1,1),and then press Enter key to get the first value, see screenshot:

doc convert vector to matrix 1

Note: In the above formula:

$C$1:$C$20: is the column data that you want to convert to matrix;

$F$1: indicates the cell where you want to put the first result of matrix;

ROWS($C$1:$C$20)/4: the number 4 is the number of rows that you want in the resulting matrix. If you want to matrix with two rows, you just need to change the 4 to 2.

You can change the above cell references to your need.

2. Then drag the fill handle down to 4 rows, and then go on dragging it to right 5 columns, and you will get the following result:

doc convert vector to matrix 2

Convert a single row to matrix:

To convert a single row to a matrix with five rows and four columns (5×4), please use the following formula:

Enter this formula into a blank cell, E4, for example: =OFFSET($A$1:$T$1,0,COLUMN()-COLUMN($E$4)+(ROW()-ROW($E$4))*(COLUMNS($A$1:$T$1)/5),1,1), then drag the fill handle down to five rows and then drag it to right four columns to get a matrix with five rows and four columns as following screenshot shown:

doc convert vector to matrix 3

Note: In the above formula:

$A$1:$T$1: is the row data that you want to convert to matrix;

$E$4: indicates the cell where you want to put the first result of the matrix;

COLUMNS($A$1:$T$1)/5: the number 5 is the number of rows that you want in the resulting matrix. If you want to matrix with two rows, you just need to change the 5 to 2.

You can change the above cell references to your need.

If there are blank cells in the original column or row, they will be displayed as 0 in the matrix.


The above formulas may be somewhat difficult for most of Excel beginner, here, I can introduce you a handy tool- Kutools for Excel, with its Transform Range utility, you can quickly convert a single row or column to a range and vice versa.

Kutools for Excel : with more than 300 handy Excel add-ins, free to try with no limitation in 60 days

After installing Kutools for Excel, please do with following steps:( Free Download Kutools for Excel Now )

1. Select the column or row data that you want to convert.

2. Then click Kutools > Range > Transform Range, see screenshot:

doc convert vector to matrix 4

3. In the Transform Range dialog box:

(1.) To convert single row to a matrix, please select Single row to range from the Transform type, to convert single column to matrix, select Single column to range;

(2.) Specify the number of columns that you want to convert in the Fixed value box under Rows per record, if you type 5, you will get a matrix with 5 columns.

doc convert vector to matrix 5

4. Then click Ok button, a prompt box will pop out to remind you select a cell to output the result, see screenshot:

doc convert vector to matrix 6

5. And then click OK, the single column has been converted to a matrix you need, see screenshot:

doc convert vector to matrix 7

Click to know more details about this Transform Range utility…

Download and free trial Kutools for Excel Now !


Kutools for Excel: with more than 200 handy Excel add-ins, free to try with no limitation in 60 days. Download and free trial Now!


Related article:

How to convert matrix to vector or single column in Excel?


Recommended Productivity Tools

Ribbon of Excel (with Kutools for Excel installed)

300+ Advanced Features Increase Your Productivity by 71%, and Help You To Stand Out From Crowd!

Would you like to complete your daily work quickly and perfectly? Kutools For Excel brings 300+ cool and powerful advanced features (Combine workbooks, sum by color, split cell contents, convert date, and so on...) for 1500+ work scenarios, helps you solve 82% Excel problems.

  •  Deal with all complicated tasks in seconds, help to enhance your work ability, get success from the fierce competition, and never worry about being fired.
  •  Save a lot of work time, leave much time for you to love and care the family and enjoy a comfortable life now.
  •  Reduce thousands of keyboard and mouse clicks every day, relieve your tired eyes and hands, and give you a healthy body.
  •  Become an Excel expert in 3 minutes, and get admiring glance from your colleagues or friends.
  •  No longer need to remember any painful formulas and VBA codes, have a relaxing and pleasant mind, give you a thrill you've never had before.
  •  Spend only $39, but worth than $4000 training of others. Being used by 110,000 elites and 300+ well-known companies.
  •  60-day unlimited free trial. 60-day money back guarantee. Free upgrade and support for 2 years. Buy once, use forever.
  •  Change the way you work now, and give you a better life immediately!

Office Tab Brings Efficient And Handy Tabs to Office (include Excel), Just Like Chrome, Firefox, And New IE

  • Increases your productivity by 50% when viewing and editing multiple documents.
  • Reduce hundreds of mouse clicks for you every day, say goodbye to mouse hand.
  • Open and create documents in new tabs of same window, rather than in new windows.
  • Help you work faster and easily stand out from the crowd! One second to switch between dozens of open documents!
Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.

Be the first to comment.