+ Reply to Thread
Results 1 to 5 of 5

Move employee data from rows to columns for the same company

  1. #1
    Registered User
    Join Date
    06-12-2013
    Location
    New Jersey, USA
    MS-Off Ver
    Excel 2010
    Posts
    4

    Move employee data from rows to columns for the same company

    Hello,

    I am dumping a contact list from a sales database and want to list all employees names and titles across one row of data. Additionally, each data row will have a primary employee name and then all other listed so if my database has 6 employees for one company I will have 6 rows of data - one for each individual employee with the five other employees listed in that same row. I am not good a VB or Macros so I have been trying vLookup, If Then, and Index with arrays. Nothing is working. Does anyone have any ideas? Attached is a sample set of data. The second worksheet in the file is the master data, the first page is where I would like to dump the data. I have sample data typed in to show shat the results should be (see orange highlighted fields on sheet 1). My Worksheet_2.xlsx.

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Move employee data from rows to columns for the same company

    Which field should be used to compare and concatenate the data?
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Registered User
    Join Date
    06-12-2013
    Location
    New Jersey, USA
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Move employee data from rows to columns for the same company

    Thank you for responding. From sheet 2 "Data Dump File" fields J, K & M should copy to Cells A2, B2 and D2 for the first employee of the company. The second employee for the same company fields J, K, & M should copy to N, O and P. For the third employee fields J, K, & M should copy to Q, R and S. This should continue for a maximum of 6 employees per company.

    Also, please note the second employee in the company should receive employees 1, 3, 4, 5 and 6 on their data line.
    Then the third employee in the company should receive employees 1, 2, 4, 5 and 6 on their data line.
    Then the fourth employee in the company should receive employees 1, 2, 3, 5 and 6 on their data line.
    Then the fifth employee in the company should receive employees 1, 2, 3, 4 and 6 on their data line.
    Then the sixth employee in the company should receive employees 1, 2, 3, 4 and 5 on their data line.
    Some companies will have less than 6 employees others may have more than 6.

    The goal is to send a letter to each employee in the company and copy the other employees. So each company will receive a maximum of 6 letters and each letter recipient will have a list of all other employees that received the same letter.

  4. #4
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Move employee data from rows to columns for the same company

    So column L will be used to check for rows having the same Company ? Is it ok if the data is sorted based on that column?

  5. #5
    Registered User
    Join Date
    06-12-2013
    Location
    New Jersey, USA
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Move employee data from rows to columns for the same company

    Yes, column L of the Data Dump (second sheet) and yes it can be sorted based on that column.

+ 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