+ Reply to Thread
Results 1 to 3 of 3

Change data from vertical format to horizontal format

  1. #1
    Valued Forum Contributor
    Join Date
    11-20-2003
    MS-Off Ver
    2010, 2016
    Posts
    1,173

    Change data from vertical format to horizontal format

    I am trying to consolidate information in a database that is not very user friendly.

    Column A contains a list if invoice numbers. Column B is the name of the Vendor. Column C is the Sales Rep ID Number.

    The problem I am having is each invoice is listed in one or more line items (which are dependent on the number of reps on the invoice in question). I am trying to create a separate sheet that will list each invoice only once but list every sales rep assigned to the invoice in separate columns.

    For example, invoice A might be listed 5 in five line items with 5 different rep numbers

    Invoice ID………………Rep Number
    A……………………………Rep_474
    A……………………………Rep_66
    A……………………………Rep_9
    A……………………………Rep_1
    A……………………………Rep_5668

    I would like the data to be listed as follows

    Invoice ID………………Rep Number1…..Rep Number2…..Rep Number3…..Rep Number4…..Rep Number5
    A……………………………Rep_474………….Rep_66……………Rep_9……………..Rep_1…………….Rep_5668



    Note: In some cases, a rep may be listed more than once on the same invoice, such as

    Invoice ID………………Rep Number
    A……………………………Rep_474
    A……………………………Rep_474
    A……………………………Rep_9
    A……………………………Rep_9
    A……………………………Rep_9

    In this case, the output would be as follows:

    Invoice ID………………Rep Number1…..Rep Number2
    A……………………………Rep_474………….Rep_9


    I have attached a small sample of raw data and desired output. Thanks in advance for any comments.

  2. #2
    Valued Forum Contributor tehneXus's Avatar
    Join Date
    04-12-2013
    Location
    Hamburg, Germany
    MS-Off Ver
    Work: MS-Office 2010 32bit @ Win8 32bit / Home: MS-Office 2016 32bit @ Win10 64bit
    Posts
    944

    Re: Change data from vertical format to horizontal format

    Hi,

    I used a dictionary to restructure the data, adapt the sheetnames if needed and check this sample sheet: Update from vertical to horizontal ver 02.xlsm

    contains:
    Please Login or Register  to view this content.
    Please use [CODE]-TAGS
    When your problem is solved mark the thread SOLVED
    If an answer has helped you please click to give reputation
    Read the FORUM RULES

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

    Re: Change data from vertical format to horizontal format

    Please Login or Register  to view this content.
    Last edited by jindon; 06-27-2013 at 07:10 PM. Reason: File attached

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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