+ Reply to Thread
Results 1 to 8 of 8

Sorting data into multiple columns based on a single column

  1. #1
    Registered User
    Join Date
    10-26-2012
    Location
    Wirral
    MS-Off Ver
    Excel 2016
    Posts
    31

    Sorting data into multiple columns based on a single column

    I have a spreadsheet detailing salaries, and it's in columnar form. So I have a column for:

    Employee Number
    Cost Centre
    Description
    Amount

    The description column lists everything on that months payroll for each employee on a new row, meaning that each employee will have at least 2 and usually more rows of data relating to them in list fashion.

    So, an employee with only two things on the payroll would appear in the description column as:

    Row 1: Salaries
    Row 2: Salaries - NI

    What I'm want to do is get excel to take the information in rows 1 and 2 put it into a column of its own based on the description column so that instead of being in list fashion, there would be a single row for each employee because "Salaries" & "Salaries - NI" would be in their own columns.

    I've attached a made-up sample of the current format of the data, and what I'm trying to get it to look like.

    can anyone help with how I might be able to do this?
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    11-09-2006
    Location
    Kansas, USA
    MS-Off Ver
    2013
    Posts
    76

    Re: Sorting data into multiple columns based on a single column

    Try this on your sample sheet. It's kinda like a "vlookup with multiple criteria".
    You'll want to hit ctrl + alt + enter after typing it in.

    =INDEX(D6:D13,MATCH(1,(A6:A13=A18)*(C6:C13=D17),0))


    A18= employee number and D17 = The column header, which is the same as the description in the data.

  3. #3
    Registered User
    Join Date
    11-09-2006
    Location
    Kansas, USA
    MS-Off Ver
    2013
    Posts
    76

    Re: Sorting data into multiple columns based on a single column

    deleted *wrong thread* sorry

  4. #4
    Registered User
    Join Date
    10-26-2012
    Location
    Wirral
    MS-Off Ver
    Excel 2016
    Posts
    31

    Re: Sorting data into multiple columns based on a single column

    doesn't work, but thanks just the same!

  5. #5
    Registered User
    Join Date
    11-09-2006
    Location
    Kansas, USA
    MS-Off Ver
    2013
    Posts
    76

    Re: Sorting data into multiple columns based on a single column

    Lagging server
    Attached Files Attached Files
    Last edited by profector; 03-15-2013 at 05:22 PM.

  6. #6
    Registered User
    Join Date
    11-09-2006
    Location
    Kansas, USA
    MS-Off Ver
    2013
    Posts
    76

    Re: Sorting data into multiple columns based on a single column

    Lagging server
    Last edited by profector; 03-15-2013 at 05:20 PM.

  7. #7
    Registered User
    Join Date
    11-09-2006
    Location
    Kansas, USA
    MS-Off Ver
    2013
    Posts
    76

    Re: Sorting data into multiple columns based on a single column

    Take a look at the attachment. There were a few differences between the descriptions, like overtime 2 didn't have a dash in the column header but it did in the data... also there was spot where salaries was misspelled. If the data doesn't match the criteria the formula can't find it. Anyways, take a look.

    If you don't want to see the n/a errors you can alway hide them using 'iferror'.

    =iferror(insertformulahere , "")
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    10-26-2012
    Location
    Wirral
    MS-Off Ver
    Excel 2016
    Posts
    31

    Re: Sorting data into multiple columns based on a single column

    fantastic! Thanks very much for your time & help in solving this. It really is appreciated!

+ 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