+ Reply to Thread
Results 1 to 5 of 5

VB Code to rearrange the data

  1. #1
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    VB Code to rearrange the data

    Hello:

    Please refer to attached file.
    I have data in column A:C as shown.
    I need VB Code to give the output of the data as shown in column G (Column I shows mapping).
    Let me know if you have any questions.
    Thanks.

    Riz
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor spitfireblue's Avatar
    Join Date
    01-29-2015
    Location
    Adelaide, Australia
    MS-Off Ver
    2007,2010,2016
    Posts
    611

    Re: VB Code to rearrange the data

    Please Login or Register  to view this content.
    Regards,
    Stephen

    If you feel someone has helped you please thank them and click on the star on their post to add reputation.
    Please ensure that you use code tags where relevant, and mark solved threads as solved.
    Most of all please be respectful and understanding of others.

  3. #3
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520

    Re: VB Code to rearrange the data

    Another way if column D is empty

    Please Login or Register  to view this content.
    Thanks,
    Mike

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved.

  4. #4
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Re: VB Code to rearrange the data

    Hello spitfireblue and Mike:

    Thanks a lot, this will work for me.
    Riz

  5. #5
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: VB Code to rearrange the data

    ...and if you want a standard Excel formula that avoids VBA and loops (which may take time if large ranges are involved) then in E3 copied down (making sure column D is blank)

    Please Login or Register  to view this content.
    copied down for n * 4 rows where n is the number of names.

    In the sheet display options deselect the 'show a zero where cells are blank' option.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

+ 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. [SOLVED] VB Code to find and rearrange
    By rizmomin in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 08-17-2016, 06:04 PM
  2. VBA code to collect and rearrange data coming from pivot table
    By vio.coman in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-02-2016, 02:56 AM
  3. VB Code to rearrange ClockIn-Clockput info
    By rizmomin in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-17-2014, 06:38 PM
  4. [SOLVED] VBA code to rearrange data into multiple columns
    By shinobi in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-14-2013, 06:33 AM
  5. [SOLVED] Getting Error 1004 Object or Application Defined Error - Code to rearrange data
    By BlazzedTroll in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 06-10-2013, 12:10 PM
  6. [SOLVED] Need code to rearrange select values
    By s4driver in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 04-22-2013, 10:16 AM
  7. [SOLVED] rearrange data
    By chartasap in forum Excel General
    Replies: 4
    Last Post: 05-01-2006, 11:50 AM

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