+ Reply to Thread
Results 1 to 4 of 4

Need help with employee census.

  1. #1
    Registered User
    Join Date
    03-15-2024
    Location
    United States
    MS-Off Ver
    2016
    Posts
    2

    Need help with employee census.

    I have an excel spreadsheet that contains an employee census. These employees do not have employee ID numbers, but are identified by their SSN. I also have a list of the employee's dependents in a separate excel spreadsheet. The dependents are tied to the employee by the employee's SSN. How do I merge the two sets of data together so that the family unit is together alphabetically by the employee last name? In other words, I want the employees sorted in alphabetical order by employee last name, with the spouse listed under the employee in the next row, and then dependent children listed under the spouse in the next rows. In my columns, I have Employee SSN, Last Name, First Name, Relationship (Employee, Spouse, Child). I cannot sort alphabetically because some family members have different last names. Any suggestions? Thank you.

  2. #2
    Forum Expert
    Join Date
    10-19-2021
    Location
    Brazil
    MS-Off Ver
    Office 365 V2401 w/ Win10 Home 64 Bit
    Posts
    2,014

    Re: Need help with employee census.

    Welcome to the forum.

    My first suggestion is that you provide us with a small realistic sample.
    Help us to help you!

  3. #3
    Registered User
    Join Date
    03-15-2024
    Location
    United States
    MS-Off Ver
    2016
    Posts
    2

    Re: Need help with employee census.

    I am new to this site, but hopefully I uploaded it the sample data set correctly.

    The first few columns are how my data appears when it is pulled from the HR data base.
    The second set of columns is how I need the data to look.
    I need to have the employees in alphabetical order with each dependent listed under them.
    The SSN is what ties the dependent to the employee.

    Any help you can provide is greatly appreciated. I have searched online for days and cannot figure out how to do this.

    Thanks so much.
    Attached Files Attached Files

  4. #4
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,570

    Re: Need help with employee census.

    Perhaps this will help.
    1. Custom sort the original data by SSN and Relation
    2. Add column E to show the order of the employees using: =IF(D5="Employee",SUMPRODUCT((D$5:D$16="Employee")*(B$5:B$16<=B5)),"")
    3. Add column F to show the order of the data using: =INDEX(E$5:E$16,MATCH(A5,A$5:A$16,0))
    4. Column H is populated using: =AGGREGATE(15,6,F$5:F$16,ROWS(H$5:H5))
    5. Columns I:L are populated using: =INDEX(A$5:A$16,AGGREGATE(15,6,(ROW(A$5:A$16)-ROW(A$4))/($F$5:$F$16=$H5),COUNTIFS($H$5:$H5,$H5)))
    Let us know if you have any questions.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

+ 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. Need help on formatting a census...
    By DCA_2017 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-27-2017, 11:43 PM
  2. Daily census report
    By suzfitzy in forum Excel General
    Replies: 9
    Last Post: 03-30-2016, 10:56 AM
  3. Need Help with Census Report
    By jnorales in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-14-2013, 01:33 PM
  4. Daily Census
    By Maria Britt in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-12-2012, 03:13 PM
  5. Average Census
    By Jambonie in forum Excel General
    Replies: 3
    Last Post: 05-09-2011, 08:15 PM
  6. Census - Sumif
    By dreicer_Jarr in forum Excel General
    Replies: 1
    Last Post: 03-05-2009, 01:56 PM
  7. Hourly Census
    By dreicer_Jarr in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-10-2009, 09:09 PM

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