+ Reply to Thread
Results 1 to 12 of 12

Dragging across columns to the right is stepping backward in the cell references

  1. #1
    Forum Contributor
    Join Date
    12-16-2011
    Location
    Portland, OR
    MS-Off Ver
    Excel 2016 Preview
    Posts
    105

    Dragging across columns to the right is stepping backward in the cell references

    I'm trying to copy a pattern of formulae from
    AL:ABX

    The pattern is in sections of 12 of which I only need 11 of the columns.

    AN begins one section, AZ begins a new section (63 total sections). With every section, the 2nd column isn't needed. So, AO is skipped.


    What's needed:

    =AN2
    AP2
    AQ2
    AR2
    AS2
    AT2
    AU2
    AV2
    AW2
    AX2
    AY2
    AZ2

    BB2
    BC2
    ...

    What actually happens when I copy across:

    =AN2
    AP2
    AQ2
    AR2
    AS2
    AT2
    AU2
    AV2
    AW2
    AX2
    AY2
    AU2

    AW2
    Ax2


    Excel seems to be picking up that it's supposed to skip the one column but I don't know why it's stepping backward.

    What is a solution for this? There's no math. These cells just need to be copied over.
    Last edited by Habanero Time; 07-06-2012 at 03:38 PM.

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Dragging across columns to the right is stepping backward in the cell references

    How does Excel know you want to skip a column at all? Exactly how are you moving these columns and where are you moving them to?
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Forum Contributor
    Join Date
    12-16-2011
    Location
    Portland, OR
    MS-Off Ver
    Excel 2016 Preview
    Posts
    105

    Re: Dragging across columns to the right is stepping backward in the cell references

    On a single row, I've set up 33 consecutive columns exactly how they should be. I then highlight all 33 cells and drag the fill bar across.

  4. #4
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Dragging across columns to the right is stepping backward in the cell references

    You get better help if you post an Excel-example of your workbook, without confidential information.

    Make sure the workbook demonstrates your desired results if possible, or just highlight the cells you're trying to fix.

    Use BEFORE/AFTER sheets if that helps make it clearer.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  5. #5
    Forum Contributor
    Join Date
    12-16-2011
    Location
    Portland, OR
    MS-Off Ver
    Excel 2016 Preview
    Posts
    105

    Re: Dragging across columns to the right is stepping backward in the cell references

    I made if the attached sample. It shows the problem where A16:K16 is right.

    However, dragging that pattern across results in K16 and L16 being the same while it does skip one column L16 to M16 which is what is needed. But the pattern is off because of L16.
    Attached Files Attached Files

  6. #6
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Dragging across columns to the right is stepping backward in the cell references

    It doesn't follow the pattern of skipping a column, it follows the pattern of the original range that you're dragging.

    In each group of 11, the first formula returns row 8 of the same column, the rest return row 8, 1 column to the right.

  7. #7
    Forum Contributor
    Join Date
    12-16-2011
    Location
    Portland, OR
    MS-Off Ver
    Excel 2016 Preview
    Posts
    105

    Re: Dragging across columns to the right is stepping backward in the cell references

    The ultimate goal is to copy 63 sections like this and have them all lined up.

  8. #8
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Dragging across columns to the right is stepping backward in the cell references

    You could try a formula that allows for the adjustment

    =INDEX(8:8,COLUMN()+(MOD(COLUMN(),11)<>1)+INT((COLUMN()-1)/11))

    Failing that I think it's going to be VBA

  9. #9
    Forum Contributor
    Join Date
    12-16-2011
    Location
    Portland, OR
    MS-Off Ver
    Excel 2016 Preview
    Posts
    105

    Re: Dragging across columns to the right is stepping backward in the cell references

    Good effort. However, the formula isn't linking things up, and it's copying the unwanted field.

    Might be some VBA or some HLOOKUPs and OFFESTs

  10. #10
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Dragging across columns to the right is stepping backward in the cell references

    I forgot to adjust the formula for your real data range, that was based on data starting in column A not AL Try

    =INDEX(8:8,COLUMN()+(MOD(COLUMN(),11)<>5)+INT((COLUMNS($AL1:AL1)-1)/11))

  11. #11
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Dragging across columns to the right is stepping backward in the cell references

    Other option.

    Why not copy the whole sheet and then delete collumn 2, 14, 26 and so on?

  12. #12
    Forum Contributor
    Join Date
    12-16-2011
    Location
    Portland, OR
    MS-Off Ver
    Excel 2016 Preview
    Posts
    105

    Re: Dragging across columns to the right is stepping backward in the cell references

    oeldere, that's what I ended up doing. It took less than 10 minutes.

+ 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