+ Reply to Thread
Results 1 to 6 of 6

Move cell data up 1 row up and over 2 columns (after a count)

  1. #1
    Registered User
    Join Date
    11-02-2012
    Location
    Dallas, TX
    MS-Off Ver
    Excel 2010
    Posts
    28

    Move cell data up 1 row up and over 2 columns (after a count)

    I need to move data from row 2, column A to row 1 column C...Any VBA help would be greatly appreciated.

    " - " hyphens are just space markers

    Original:
    -------Col1---Col2----Col3---Col4
    Row1--Dog---Cat---
    Row2--Cow---Pig
    Row3 (blank)
    Row4--Red----Blue
    Row5--Grey---Black
    Row6 (blank)
    *and this keeps repeating to end of document*

    I want it to change to:
    -------Col1---Col2--Col3--Col4
    Row1--Dog----Cat--Cow---Pig
    Row2 (blank)
    Row3 (blank)
    Row4--Red----Blue--Grey--Black
    Row5 (blank)
    Row6 (blank)
    Last edited by steven_e; 09-30-2013 at 12:09 PM.

  2. #2
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Move cell data up 1 row up and over 2 columns (after a count)

    Please Login or Register  to view this content.
    If solved remember to mark Thread as solved

  3. #3
    Registered User
    Join Date
    11-02-2012
    Location
    Dallas, TX
    MS-Off Ver
    Excel 2010
    Posts
    28

    Re: Move cell data up 1 row up and over 2 columns (after a count)

    that did not work, but I realized I needed space markers to better define the rows and columns. I added hyphens if that helps....this VBA should loop to end of data and do the same for example listed.

    So Row 2 Col A & B goes accordingly to Row 1 Col C & D
    Last edited by steven_e; 09-30-2013 at 12:18 PM.

  4. #4
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Move cell data up 1 row up and over 2 columns (after a count)

    can you attach a sample file ?

  5. #5
    Registered User
    Join Date
    11-02-2012
    Location
    Dallas, TX
    MS-Off Ver
    Excel 2010
    Posts
    28

    Re: Move cell data up 1 row up and over 2 columns (after a count)

    file attached, thanks
    Attached Files Attached Files

  6. #6
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Move cell data up 1 row up and over 2 columns (after a count)

    Hi, steven_e,

    assuming that there will always be two rows of data and a blank row thereafter:
    Please Login or Register  to view this content.
    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

+ 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. Need to move data that matches criteria in cell and move to new worksheet
    By panagle in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-27-2013, 09:23 AM
  2. Replies: 5
    Last Post: 12-06-2011, 09:23 AM
  3. Move data to new columns when cell in Column A is blank
    By MrClaw in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-28-2010, 12:51 PM
  4. Move data in rows to columns
    By hfler in forum Excel General
    Replies: 2
    Last Post: 07-14-2008, 12:32 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