In Microsoft Excel, how do I change an array of values from vertical to horizontal orientation or vice versa?
To change an array of values from vertical to horizontal orientation or vice versa in Microsoft Excel, use the TRANSPOSE function.
To use TRANSPOSE, highlight the range you would like to copy the values into, which must be the same size as the original range, except that the horizontal and vertical values are reversed.
If you want to transpose a 2x3 array, like this:
| A | B | C | |
|---|---|---|---|
| 1 | 2.3 | 3.4 | 4.5 |
| 2 | 6.7 | 7.8 | 8.9 |
then you must highlight a 3x2 range, like this:
| A | B | |
|---|---|---|
| 3 | ||
| 4 | ||
| 5 |
Note: You cannot transpose into a range of cells that overlaps with the original array.
When your target range is highlighted, enter:
=TRANSPOSE(range)Replace range with the range you wish to copy. For example,
to transpose the hypothetical range shown above, you would enter:
When you have the range entered, press Ctrl-Shift-Enter.
(On a Mac, press Command-Return.) You
should see your values change from horizontal to vertical, like this:
| A | B | |
|---|---|---|
| 3 | 2.3 | 6.7 |
| 4 | 3.4 | 7.8 |
| 5 | 4.5 | 8.9 |
Note: The range you copy to will become an array; in an array, you may not change any single value in the range without changing the entire range. Therefore, make sure you have the range correct before using the TRANSPOSE function to copy it. However, if you use Paste Special to paste values directly over what you want to change, you'll be able to change single values.
Last modified on May 26, 2010.







