

Others prefer the data vertically in columns. Some people create Excel spreadsheets with the main fields horizontal. After incorrectly entering data, one of the most common mistakes is transposing columns and rows. For example, the formula shown above squares the number and adds 1.You store your information or data in various rows and columns. You can use calculations with either the INDEX or TRANSPOSE functions. In real life, you might need to do calculations instead of copying the data. If cells in column A change, they will change in row 2.Īdditional Details: The example in this topic is a trivial example of merely copying the cells. The advantage of using TRANSPOSE over using Paste Special, Transpose is that the TRANSPOSE function is a live formula.


Unlike INDEX, dollar signs are not necessary in this formula. The trick is that a single function has to be entered in many cells at once. Copy B2 across to transpose with a formula.Īlternate Strategy: It is slightly harder to use, but the TRANSPOSE function will perform the same task as COLUMN.Even if the formula starts in column XFA, you will still point to A1 in order to return the number 1. In this example, the first formula is in column B. Gotcha: You need to use A1 as the reference for the COLUMN function no matter where you are entering the formula. Therefore, if you use the formula =INDEX($A$4:$A$10,COLUMN(A1)) in cell B2, you can easily copy it across the columns. As you copy, Excel will take care of the rest. Any time you need to fill in the numbers 1, 2, 3 as you go across a row, you can use the =COLUMN(A1) in the first cell. While this is not entirely amazing, the beautiful thing about this function is that as you copy to the right, =COLUMN(A1) will change to =COLUMN(B1) and return a 2.

The formula =COLUMN(A1) will return a 1 to indicate that cell A1 is in the first column. It would be cool if there were a function that could return the numbers 1, 2, 3, and so on as you copy across. Strategy: You can use the INDEX function to return the nth item from the A4:A10 range.
