+ Reply to Thread
Results 1 to 8 of 8

Re-arrange data

  1. #1
    Forum Contributor
    Join Date
    06-08-2012
    Location
    Lagos, Nigeria
    MS-Off Ver
    Excel 2007, 2010, 2016
    Posts
    102

    Re-arrange data

    Dear experts,

    This is one of those days that i need a code that can help me re-arrange data so that i can feed the data into another solution that i am working on.

    The source data is arranged in such a way that it makes the solution that i am working on a bit cumbersome. Therefore, sheet called the "Output" is the end-game.

    Please i need all the help i can get.

    Many thanks!

    CC: Jindon
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,464

    Re: Re-arrange data

    See if this is how you wanted
    Please Login or Register  to view this content.

  3. #3
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Cool Try this demonstration …


    According to the attachment as a VBA beginner starter :

    PHP Code: 
    Sub Demo1()
        
    Dim R&, C%
            
    3
            Sheet2
    .[B2].CurrentRegion.Offset(1).Clear
            Application
    .ScreenUpdating False
        With Sheet1
    .[E7].CurrentRegion.Rows("3:" Sheet1.[E7].CurrentRegion.Rows.Count 1).Columns
               
    .Item(1).Copy Sheet2.Cells(R3).Resize((.Count 1) * .Rows.Count)
            For 
    2 To .Count
               
    .Cells(-1C).Copy Sheet2.Cells(R2).Resize(.Rows.Count)
               .
    Item(C).Copy Sheet2.Cells(R4).Resize(.Rows.Count)
                
    + .Rows.Count
            Next
        End With
            Application
    .ScreenUpdating True
    End Sub 
    ► Do you like it ? ► ► So thanks to click on bottom left star icon « Add Reputation » ! ◄ ◄

  4. #4
    Forum Contributor
    Join Date
    06-08-2012
    Location
    Lagos, Nigeria
    MS-Off Ver
    Excel 2007, 2010, 2016
    Posts
    102

    Re: Re-arrange data

    Thanks Jindon for your help. However, the date column was repeating value in the custom column. Please help look at that!

    Many thanks!

  5. #5
    Forum Contributor
    Join Date
    06-08-2012
    Location
    Lagos, Nigeria
    MS-Off Ver
    Excel 2007, 2010, 2016
    Posts
    102

    Re: Try this demonstration …

    This works as advertised Marc. Thanks very much for your time.

  6. #6
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,464

    Re: Re-arrange data

    Quote Originally Posted by kay007 View Post
    Thanks Jindon for your help. However, the date column was repeating value in the custom column. Please help look at that!

    Many thanks!
    Ahhh,

    Change
    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.

  7. #7
    Forum Contributor
    Join Date
    06-08-2012
    Location
    Lagos, Nigeria
    MS-Off Ver
    Excel 2007, 2010, 2016
    Posts
    102

    Re: Re-arrange data

    Perfect. Thanks alot

  8. #8
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2403 Win 11 Home 64 Bit
    Posts
    23,811

    Re: Re-arrange data

    Here is an alternative solution using Power Query. File attached for your review

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

+ 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. Arrange data to the be the same row
    By yukioh in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-11-2019, 01:01 AM
  2. Arrange data
    By Harry1986 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-10-2018, 09:12 AM
  3. Arrange data
    By hanif in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-06-2017, 11:20 AM
  4. [SOLVED] Re-arrange data
    By kay007 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-23-2017, 06:53 AM
  5. [SOLVED] Arrange Data
    By sanju2323 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-19-2016, 02:52 AM
  6. Arrange data
    By ordinateur in forum Excel General
    Replies: 7
    Last Post: 02-17-2010, 12:53 PM
  7. Arrange Data
    By RemyD in forum Excel General
    Replies: 3
    Last Post: 05-07-2009, 02:00 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