# Copy value from every nth column

In Excel, you can't easily create formulas that skip columns following a certain pattern, because the references in the formula will automatically change to maintain the relationship between the original source cell and the new target cell. However, with a little work it's possible to construct formula references that will follow a specific pattern using the the OFFSET function.

The OFFSET function is designed to create references by using "offsets" from a starting cell. In the example shown, the starting cell is C5, provided to OFFSET as an absolute reference so it won't change as the formula is copied:

=OFFSET($C$5

For the rows argument, we provide zero, since we want to stay in the same row. For the columns argument, we use a sub formula to calculate the required offset value:

(COLUMN(A8)*3)-1

We use A8 inside COLUMN to return 1 (since A is the first column), then multiply by n (which is 3 in this case) to get 3.

As the formula is copied across the row to the right, the value returned by COLUMN increments by 1, which is what creates the "nth pattern".

### Starting at 1

If you want to start copying at the first value, you can adjust the formula like this:

By subtracting 1, we force a column offset of zero in the first formula.

### Copy to rows instead of columns

To copy from columns into rows, you can modify the formula like this:

Here, the COLUMN function has been replaced with the ROW function, and a reference to the first row in the column, so that incrementing works correctly as the formula is copied down into multiple rows.

## Excel Formula Training

Formulas are the key to getting things done in Excel. In this accelerated training, you'll learn how to use formulas to manipulate text, work with dates and times, lookup values with VLOOKUP and INDEX & MATCH, count and sum with criteria, dynamically rank values, and create dynamic ranges. You'll also learn how to troubleshoot, trace errors, and fix problems. Instant access. See details here.