Skip to main content

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


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 30 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:

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 300 handy Excel add-ins, free to try with no limitation in 30 days. Download and free trial Now!

Related article:

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

Best Office Productivity Tools

🤖 Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions
Popular Features: Find, Highlight or Identify Duplicates   |  Delete Blank Rows   |  Combine Columns or Cells without Losing Data   |   Round without Formula ...
Super Lookup: Multiple Criteria VLookup    Multiple Value VLookup  |   VLookup Across Multiple Sheets   |   Fuzzy Lookup ....
Advanced Drop-down List: Quickly Create Drop Down List   |  Dependent Drop Down List   |  Multi-select Drop Down List ....
Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  |  Compare Ranges & Columns ...
Featured Features: Grid Focus   |  Design View   |   Big Formula Bar    Workbook & Sheet Manager   |  Resource Library (Auto Text)   |  Date Picker   |  Combine Worksheets   |  Encrypt/Decrypt Cells    Send Emails by List   |  Super Filter   |   Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolsets12 Text Tools (Add Text, Remove Characters, ...)   |   50+ Chart Types (Gantt Chart, ...)   |   40+ Practical Formulas (Calculate age based on birthday, ...)   |   19 Insertion Tools (Insert QR Code, Insert Picture from Path, ...)   |   12 Conversion Tools (Numbers to Words, Currency Conversion, ...)   |   7 Merge & Split Tools (Advanced Combine Rows, Split Cells, ...)   |   ... and more

Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time.  Click Here to Get The Feature You Need The Most...

Description


Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!
Comments (2)
Rated 5 out of 5 · 1 ratings
This comment was minimized by the moderator on the site
Thanks for the information. It was very helpful.
Rated 5 out of 5
This comment was minimized by the moderator on the site
Thank you so much!
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations