0

In Excel 2007, how do I autofill a function of =OFFSET(C2,10,0) to end up as:

=OFFSET(C2,10,0)
=OFFSET(C12,10,0)
=OFFSET(C22,10,0)

etc.

as a pattern of referencing every 10th cell in the same row.

instead of this result:

=OFFSET(C2,10,0)
=OFFSET(C3,10,0)
=OFFSET(C4,10,0)

If have also tried:

=OFFSET(C2,10,0)
=OFFSET(C12,10,0)

But the result when dragging two selected cells ends up like this:

=OFFSET(C4,10,0)
=OFFSET(C14,10,0)

on the 3rd and 4th cell when autofilling.

There are 30,000 records to this data so simply deleting unwanted results would not be time-efficient.

5
  • Welcome! We'll need a little more involvement to be able to give you an accurate answer. You've tagged this as "auto-form-fill" which is inaccurate to what you're asking (please see the tag's description), and more importantly, you didn't include which program you are talking about. Excel? Also, what have you attempted already, and what were the results? Aug 27, 2015 at 15:15
  • I'm using Excel 2007. When I autofill the results are =OFFSET(C2,10,0) =OFFSET(C3,10,0) Aug 27, 2015 at 15:19
  • OK, I've edited the tags for you. :) For best results (and less down-votes), please edit your question to include what you've tried already, and what the results were. Good luck! Aug 27, 2015 at 15:21
  • Normally when you drag the formula down, it will automatically fill. If there are certain rows you don't want filled then simply drag it down and delete those rows after.
    – Eric F
    Aug 27, 2015 at 15:28
  • You’re not looking to do =OFFSET(C2,10,0), =OFFSET(C12,10,0). You need to do =OFFSET(C2,0,0), =OFFSET(C2,10,0), =OFFSET(C2,20,0), and Hannu gave a very good answer.
    – User15
    Aug 27, 2015 at 16:30

1 Answer 1

1

Autofill will only add ONE per 'moved' row/column to cell-references, but this can be used to achieve the intended result...

Try this:
=OFFSET($C$2,(ROWS($C$2:$C2)-1)*10,0)

In this all references to cells start at $C$2 (first parameter).
It will stay as is, due to the $-s.

The result from ROWS(...) will increase by one for each extra line it gets copied to, as the 2 in :$C2 will increase.

The -1 will allow "0" as result from (ROWS(...)-1), and finally *10 will make the formula reference every tenth row.


To adapt this for using columns instead:
replace ROWS with COLUMNS and then make :$C2 be :C$2 instead.

2
  • Thank you very much for all your help, worked perfectly!! Aug 27, 2015 at 17:24
  • The please click on the tick (making it green) in the upper left of this answer; this marks the question to have an accepted answer and adds to my "rep" ;-)
    – Hannu
    Aug 27, 2015 at 18:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .