+ Reply to Thread
Results 1 to 8 of 8

copy and shift column(s)

  1. #1
    Registered User
    Join Date
    07-06-2016
    Location
    Rotterdam, Netherlands
    MS-Off Ver
    15.23.2
    Posts
    4

    Question copy and shift column(s)

    Hi all, I am new to this forum, looking forward to learn a lot!

    My first question is this:

    I want to use a formula that copies text from a cell and shifts it by one column to the right in the next row.
    It would continue copying as much as there are filled cells, so for instance:

    A1 (a) B1 (b)

    the formula would automatically add

    A2 (b) B2 (a)

    if the first row contains more cells filled:

    A1 (a) B1 (b) C1 (c) D1 (d)

    the formula goes on, like this:

    A2 (b) B2 (c) C2 (d) D2 (a)
    A3 (c) B3 (d) C3 (a) D3 (b)
    A4 (d) B4 (a) C4 (b) D4 (c)

    any help would be appreciated!
    Last edited by dazzdazz; 07-06-2016 at 05:22 AM.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,466

    Re: copy and shift column(s)

    Looks like you just need: Cell A2 formula:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    copied across and down.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,466

    Re: copy and shift column(s)

    Sorry, slightly more complicated: A2:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    copied across and down.

  4. #4
    Registered User
    Join Date
    07-06-2016
    Location
    Rotterdam, Netherlands
    MS-Off Ver
    15.23.2
    Posts
    4

    Re: copy and shift column(s)

    thanks, I tried that; but I want the text in A1 copied as well.
    So, if I have A1 (a) and B1 (b) etcetera
    I want to see A2 (b) and B2 (a)
    as a loop sort of
    your method doesnt do that

  5. #5
    Registered User
    Join Date
    07-06-2016
    Location
    Rotterdam, Netherlands
    MS-Off Ver
    15.23.2
    Posts
    4

    Re: copy and shift column(s)

    thanks, I get "the formula contains an error"...

  6. #6
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,466

    Re: copy and shift column(s)

    Try changing the commas to semi-colons.

  7. #7
    Registered User
    Join Date
    07-06-2016
    Location
    Rotterdam, Netherlands
    MS-Off Ver
    15.23.2
    Posts
    4

    Re: copy and shift column(s)

    nice, works!
    can you briefly explain (translate) the formula so I have better understanding?

  8. #8
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,737

    Re: copy and shift column(s)

    Put this formula in A2:

    =IF(COLUMN()>COUNTA($1:$1),"",IF(ROWS($1:1)>COUNTA($1:$1),"",INDEX($1:$1,MOD(ROWS($1:1)-1+COLUMN(A:A),COUNTA($1:$1))+1)))

    then copy across and down as far as you like.

    Note: you may need to change the commas ( , ) to semicolons ( ; ), depending on your regional settings.

    Hope this helps.

    Pete

    Oops, I didn't refresh the screen before posting. Anyway, it's an alternative, which allows you to copy as far as you like.

    Pete
    Last edited by Pete_UK; 07-06-2016 at 05:51 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Shift of range in formula by 1 column when 1 new column is added
    By megaheinz in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-05-2015, 03:23 AM
  2. [SOLVED] Copy or shift Text to next column
    By gondal in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 06-02-2015, 12:13 PM
  3. Copy range into specific row and shift other rows down
    By NIKNIKNIK in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 10-17-2014, 04:33 AM
  4. Caculating # of Day Shift Hrs & Night Shift Hrs of a Given Shift
    By DaKhoda in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-29-2014, 08:36 PM
  5. shift cells in column 2 spaces to right if specific text appears in that column
    By hosburgh in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-13-2014, 12:46 PM
  6. How to shift down 31 rows everytime i copy a cell?
    By Lewis Koh in forum Excel General
    Replies: 9
    Last Post: 05-11-2010, 07:23 PM
  7. Replies: 3
    Last Post: 09-25-2007, 02:39 PM

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