Is there a formula to transpose a range?

excelos

Well-known Member
Joined
Sep 25, 2011
Messages
591
Office Version
  1. 365
Platform
  1. Windows
Hello,

Is there a way to specify a vertical range and fill in a row with that?

Thanks!
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
There is a a Copy -> Paste Special -> Transpose option, if that is what you are asking.
If that is not, please describe your problem in more detail and maybe post an example of exactly what you are trying to do.
 
Upvote 0
There is a a Copy -> Paste Special -> Transpose option, if that is what you are asking.
If that is not, please describe your problem in more detail and maybe post an example of exactly what you are trying to do.


Hello, yes, I know the special paste button, but I want to do that with formulas.

Let's say you have a horizontal rage (eg random numbers in A1:G1).

How can you write a formula in A2 and drag it across A3, A4 etc so that A2 copies A1, A3 copies B1 etc
 
Upvote 0
To expand a bit on Rory's idea, select A2:A8, enter the formula =TRANSPOSE(A1:G1) and press Control+Shift+Enter.
 
Upvote 0
Here is one way.

Enter this formula in A2 and copy down:
Code:
=OFFSET($A$1,0,ROW()-2)

To see how the OFFSET function works, see this: https://exceljet.net/excel-functions/excel-offset-function
You could also use this formula which uses the non-Volatile INDEX function instead of the Volatile OFFSET function...

=INDEX(A$1:G$1,1,ROWS(A$2:A2))

Although if you want to allow the formula to be dragged down past where there is available data to fill the cells, then this version would be more appropriate...

=IFERROR(INDEX(A$1:G$1,1,ROWS(A$2:A2)),"")
 
Upvote 0
You could also use this formula which uses the non-Volatile INDEX function instead of the Volatile OFFSET function...
=IFERROR(INDEX(A$1:G$1,1,ROWS(A$2:A2)),"")

Thanks, that's seems ideal.

Btw, what do you mean by volatile/non-volatile?

Also, I assume the above is to convert a row to a column?
What would be the opposite, it to convert a column to a row?

Thanks!
 
Upvote 0

Forum statistics

Threads
1,215,036
Messages
6,122,794
Members
449,095
Latest member
m_smith_solihull

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top