Excel Macro to move columns to 1 row after each other.


  1. Posts : 14
    Windows 8.1 Professional 64bit
       #1

    Excel Macro to move columns to 1 row after each other.


    I was hoping someone could help me write or find a macro that would take two columns and move it to column A under the previous data and repeat for all columns. Basically user information is located in pairs of columns (typeofvalue, value). So column A and B are for user1, column C and D are user2, column E and F are user3, etc. Bonus if I could have a space in between each once moved.

    Current:

    HTML Code:
    A			B			C			D		
    User1First		User1Last		User2First		User2Last
    User1ValueTypeA1	User1ValueB1		User2ValueTypeA1	User2ValueB1
    User1ValueTypeA2	User1ValueB2		User2ValueTypeA1	User2ValueB1
    Desired:

    HTML Code:
    A			B
    User1First		User1Last
    User1ValueTypeA1	User1ValueB1
    User1ValueTypeA2 	User1ValueB2
    
    SPACE/EMPTY ROW
    
    User2First		User2Last
    User2ValueTypeA1	User2ValueB1
    User2ValueTypeA1	User2ValueB1
    Each user has 47 rows of "values", for the example I just did two rows worth.
      My Computer


  2. Posts : 5,915
    Windows 10 Pro X64
       #2

    I did a quick google and found this. It worked for you?

    Excel macro to move columns to 1 row after each other
      My Computer


  3. Posts : 14
    Windows 8.1 Professional 64bit
    Thread Starter
       #3

    Dude said:
    I did a quick google and found this. It worked for you?

    Excel macro to move columns to 1 row after each other
    Yes it did, thank you for checking in. I've marked this thread as solved.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 03:28.
Find Us