+ Reply to Thread
Results 1 to 12 of 12

Formula autofill to columns, NOT rows?

  1. #1
    Registered User
    Join Date
    08-10-2010
    Location
    WI
    MS-Off Ver
    Excel 2003
    Posts
    8

    Formula autofill to columns, NOT rows?

    So I have a basic formula, =A2 lets say

    I want to autofill it down, but I want the autofill to Go "=C2", "=E2", "=G2"

    How can I do that?

    Thanks

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Formula autofill to columns, NOT rows?

    you could use
    =INDEX($2:$2,ROW(A1))
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Registered User
    Join Date
    08-10-2010
    Location
    WI
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Formula autofill to columns, NOT rows?

    Yeah that doesnt work. Auto fill then picks A2, A3.

    I need to lock the row, and have the colum move (by 2) in autofilling

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Formula autofill to columns, NOT rows?

    =INDEX($2:$2, 2*ROW(A1)-1)

    It should be modified to incorporate the first row in which the formula appears, so it doesn't change when rows are inserted.
    Entia non sunt multiplicanda sine necessitate

  5. #5
    Forum Contributor
    Join Date
    02-24-2010
    Location
    BC, Canada
    MS-Off Ver
    Excel 2010
    Posts
    174

    Re: Formula autofill to columns, NOT rows?

    You could put this into A3 and copy it down and it would work

    =INDIRECT(ADDRESS(1,ROW()*2-5))

    You would have to adjust the "-5" depending on where your formula starts

    I attached a sample

    Edit- you'd have to change the "1" to a "2" because in my sample i used row 1
    Attached Files Attached Files
    Last edited by The Phil; 08-12-2010 at 06:59 PM.

  6. #6
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Formula autofill to columns, NOT rows?

    what do you mean? =INDEX($2:$2,ROW(A1)) doesn't work? try it first! ignore that it says a1
    =INDEX($2:$2,ROW(z1)) will do the same thing its just using row() to return a number
    row(a1)=1 row(a2)=2

    dragged down it will return the results from a2,b2,c2,d2
    ie
    =INDEX($2:$2,ROW(A1)) =INDEX($2:$2,1) =a1
    =INDEX($2:$2,ROW(A2)) =INDEX($2:$2,2) = b2
    =INDEX($2:$2,ROW(A3)) =INDEX($2:$2,3) = c2
    =INDEX($2:$2,ROW(A4)) =INDEX($2:$2,4) = d2
    edit missed the every other column bit!
    then shg's suggestion is the one to use!
    =INDEX($2:$2, 2*ROW(A1)-1)
    Last edited by martindwilson; 08-12-2010 at 07:43 PM.

  7. #7
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Formula autofill to columns, NOT rows?

    dragged down it will return the results from a2,b2,c2,d2
    but i want the autofill to go "=c2", "=e2", "=g2"
    .

  8. #8
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Formula autofill to columns, NOT rows?

    see end of my last post lol!

  9. #9
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Formula autofill to columns, NOT rows?

    It should be modified to incorporate the first row in which the formula appears, so it doesn't change when rows are inserted.
    If the formula starts in some random cell, say Z5, then the formula should be

    =INDEX($2:$2, 2*ROWS(Z$5:Z5)-1)

  10. #10
    Registered User
    Join Date
    08-10-2010
    Location
    WI
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Formula autofill to columns, NOT rows?

    This is pretty close, thanks.

    The problem I am having is I need the value to start in column 4, and THEN move right 2 columns

    Right now it starts in column2 and goes by 2s

  11. #11
    Registered User
    Join Date
    08-10-2010
    Location
    WI
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Formula autofill to columns, NOT rows?

    Ive played a little bit with changing 2*ROWS to 4*ROWS and the -2 at the end, but to no avail

  12. #12
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Formula autofill to columns, NOT rows?

    =index($2:$2,,2*rows($a$1:a4)-4)

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1