You can use a formula approach:
a second way is to use a formula like:
In this case you select the range say M1:AH1, type the formula and press
Shift+Ctrl+Enter. The array formula will do the job nicely. These
techniques can be used with 3-D ranges.
Assume that you want to copy column D's data to the right and maintain a
formula. In this example, I am only dealing with one column and the first
cell D1 contain a title which I am not transposing, although you could.