+ Reply to Thread
Results 1 to 9 of 9

Transposing data

  1. #1
    Registered User
    Join Date
    09-16-2015
    Location
    Knoxville, TN
    MS-Off Ver
    2013
    Posts
    22

    Transposing data

    Hello all,

    I have a report that I need the data to be moved from two columns to their own columns. The first column has the field names as you can see. Column B has variable data that corresponds to the respective field name. The space between the below column is for your benefit. There is no delimiter between them. I could add one if needed.

    SamAcntName
    GivenName
    Surname
    DisplayName
    Description
    Location
    AccntPword
    EmployeeType
    Path
    Script
    AccntExpiration
    UDrivePath
    ManagerUserID

    SamAcntName
    GivenName
    Surname
    DisplayName
    Description
    Location
    AccntPword
    EmployeeType
    Path
    Script
    AccntExpiration
    UDrivePath
    ManagerUserID


    WHat I want is:
    SamAcntName GivenName Surname etc.....
    userid1 Jake Bleh
    userid2 MoMo Fleh

    I could swear up and down that this a pivot table issue, but I have tried to create the pivot table with no results.

  2. #2
    Valued Forum Contributor
    Join Date
    06-29-2014
    Location
    Australia
    MS-Off Ver
    MSO 365
    Posts
    1,098

    Re: Transposing data

    Hello Lonesoac0,

    I don't see any Column B values in your post. Both columns are the same. However, below is some code which I think will do as you would like:-

    Please Login or Register  to view this content.
    I've attached my test work book for you to play with. Click on the "RUN" button to see it work.

    I've just made up some Column B values in the sample.

    I hope that this helps.

    Cheerio,
    vcoolio.
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    09-16-2015
    Location
    Knoxville, TN
    MS-Off Ver
    2013
    Posts
    22

    Re: Transposing data

    First, thank you for your response. Here is a better representation of my report.

    SamAcntName sdfsdfsdf
    GivenName sf
    Surname sfsdvsvsdv
    DisplayName svdsvdsvsdv
    Description svsdvsdvsvdsvsdsd
    Location svdsd
    AccntPword sdvsdvdsv
    EmployeeType svsdsvsvdvdsvv
    Path svsdvvsdvsdvsdvs
    Script svdsvsvds
    AccntExpiration svsdvsdvsdv
    UDrivePath svsdvsvsvsvsvdvs
    ManagerUserID svsdvsdvsvsds
    SamAcntName svsdvsdvsdv
    GivenName svsdvdsv
    Surname ssdvsd
    DisplayName svdsdvsdvsdvsv
    Description svdssvsdsvsdvs
    Location sdfsdfsdf
    AccntPword sf
    EmployeeType sfsdvsvsdv
    Path svdsvdsvsdv
    Script svsdvsdvsvdsvsdsd
    AccntExpiration svdsd
    UDrivePath sdvsdvdsv
    ManagerUserID svsdsvsvdvdsvv
    SamAcntName svsdvvsdvsdvsdvs
    GivenName svdsvsvds
    Surname svsdvsdvsdv
    DisplayName svsdvsvsvsvsvdvs
    Description svsdvsdvsvsds
    Location svsdvsdvsdv
    AccntPword svsdvdsv
    EmployeeType ssdvsd
    Path svdsdvsdvsdvsv
    Script svdssvsdsvsdvs
    AccntExpiration svsdsvsvdvdsvv
    UDrivePath svsdvvsdvsdvsdvs
    ManagerUserID svdsvsvds
    SamAcntName svsdvsdvsdv
    GivenName svsdvsvsvsvsvdvs
    Surname svsdvsdvsvsds
    DisplayName svsdvsdvsdv
    Description svsdvsvsvsvsvdvs
    Location svsdvsdvsvsds
    AccntPword svsdvsdvsdv
    EmployeeType svsdvdsv
    Path ssdvsd
    Script svdsdvsdvsdvsv
    AccntExpiration svdssvsdsvsdvs
    UDrivePath svsdsvsvdvdsvv
    ManagerUserID svsdvvsdvsdvsdvs


    I want:

    GivenName Surname DispalyName etc.
    sdfsdfsdf aasacaca ascascas
    sdfsfdsdfssf acascac ascascsac
    sdsdfsdd acascascasc acacsascsac
    sfdsfssvs ascacac asdascsac

    Sorry for not specifying more.

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

    Re: Transposing data

    Try
    Please Login or Register  to view this content.

  5. #5
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,168

    Re: Transposing data

    Hi loans,

    No VBA needed. If you create some helper columns it can be done without vba. See the attached where I've copied the head column to the right and used two helper columns. Then an Index Match formula does the trick.

    See the attached.
    Index Match Helpers.xlsx
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  6. #6
    Registered User
    Join Date
    09-16-2015
    Location
    Knoxville, TN
    MS-Off Ver
    2013
    Posts
    22

    Re: Transposing data

    Thank you all for your support on this issue. I KNEW there was a way to naively do what I wanted, I just had no idea how to do it. I was looking into PowerQuery and everything. I definitely plan on using both answers in different situations.

    Thank you both!

  7. #7
    Registered User
    Join Date
    09-16-2015
    Location
    Knoxville, TN
    MS-Off Ver
    2013
    Posts
    22

    Re: Transposing data

    I am not going to lie, I went straight into work to test this out. It works like a charm!

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

    Re: Transposing data

    You are welcome and thanks for the rep.

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

  9. #9
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,908

    Re: Transposing data

    Another (faster) method.
    Please Login or Register  to view this content.
    Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
    You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.

+ 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. Transposing repeating vertical data to horizontal data but retaining unique values only
    By mgcarino14 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-06-2014, 12:57 AM
  2. Transposing list of values with 6 zeroes in front to retain the zero after transposing
    By Lisa4legin in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-16-2013, 03:34 AM
  3. Transposing data
    By Beginner Level in forum Excel General
    Replies: 4
    Last Post: 02-17-2012, 12:49 AM
  4. Transposing Data
    By chinanomad in forum Excel General
    Replies: 3
    Last Post: 02-23-2011, 05:57 AM
  5. Replies: 5
    Last Post: 04-23-2010, 08:01 AM
  6. Replies: 5
    Last Post: 08-01-2006, 12:23 AM
  7. Transposing Data
    By NicB. in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-06-2005, 09:33 AM

Tags for this Thread

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