+ Reply to Thread
Results 1 to 6 of 6

Data Table - how to rearrange dataset?

  1. #1
    Registered User
    Join Date
    03-28-2017
    Location
    US
    MS-Off Ver
    2010
    Posts
    42

    Data Table - how to rearrange dataset?

    Hello,

    How to convert the dataset below to the way that I can Pivot?

    DataSet
    name2 value
    userid 101
    userlogin admin
    firstname The
    surname Administrator
    userid 102
    userlogin John.Doe
    firstname John
    surname Doe
    userid 104
    userlogin Jane.Dee
    firstname Jane
    surname Dee


    Convert the above to below:
    userid userlogin firstname surname
    101 admin The Administrator
    102 John.Doe John Doe
    104 Jane.Dee Jane Dee

    Thanks!

    +Attached sample dataset
    Attached Files Attached Files
    Last edited by spider_min; 03-16-2022 at 04:15 PM.

  2. #2
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Data Table - how to rearrange dataset?

    Could you post your sample data in a workbook showing before and after?
    It loses it's formatting when you paste it into a forum post like that so not 100% clear what it looks like originally or the expected result.

    BSB

  3. #3
    Registered User
    Join Date
    03-28-2017
    Location
    US
    MS-Off Ver
    2010
    Posts
    42

    Re: Data Table - how to rearrange dataset?

    I've attached a dataset.

  4. #4
    Forum Expert dosydos's Avatar
    Join Date
    12-09-2015
    Location
    Massachusetts
    MS-Off Ver
    365(PC) V:2308
    Posts
    1,474

    Re: Data Table - how to rearrange dataset?

    if your data is always going to be 3 rows per dataset (ex. ID,First,Last) then 3 simple offset formulas can get the job done, then drag all three formulas down for rest of data.

    ID
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    First
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Last
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    <----- If you are happy with your solution please click on the "* Add Reputation" as a way to say thank you.

  5. #5
    Registered User
    Join Date
    03-28-2017
    Location
    US
    MS-Off Ver
    2010
    Posts
    42

    Re: Data Table - how to rearrange dataset?

    Hi dosydos,

    How can I modify the code if there are more than 3 rows per dataset?
    Last edited by spider_min; 03-16-2022 at 04:54 PM.

  6. #6
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,300

    Re: Data Table - how to rearrange dataset?

    =INDEX($B$3:$B$14,(ROWS($1:1)-1)*3+COLUMN(A1))

    copy across and down
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

+ 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. Rearrange data from one table to another
    By rajatgulati117 in forum Excel General
    Replies: 1
    Last Post: 03-23-2020, 05:17 PM
  2. Replies: 3
    Last Post: 10-20-2017, 12:40 AM
  3. Effectively rearrange large dataset
    By DanielZig in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-15-2017, 08:03 AM
  4. [SOLVED] Rearrange data into another table
    By golden2282 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-03-2016, 12:26 PM
  5. [SOLVED] how to rearrange raw data into a new table?
    By meirj in forum Excel General
    Replies: 2
    Last Post: 10-16-2013, 12:32 PM
  6. Macro to rearrange table of data
    By dcgrove in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-06-2013, 02:14 PM
  7. Rearrange source data into a table
    By ferrari62589 in forum Excel General
    Replies: 4
    Last Post: 06-13-2008, 06:25 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