+ Reply to Thread
Results 1 to 8 of 8

Sorting mixed list into two separate lists (INDEX-SMALL-IF)

  1. #1
    Registered User
    Join Date
    01-07-2018
    Location
    UK
    MS-Off Ver
    Office 365
    Posts
    39

    Sorting mixed list into two separate lists (INDEX-SMALL-IF)

    Hi,

    I am trying to figure out how to separate out a mixed list of staff that are casual or regular, into two separate lists. The first column is the name, and the next is the identifier 'casual' or 'regular'. Example Spreadsheet is attached.

    I have used a combination of INDEX with SMALL and IF to do a similar operation in the past, but only because it was explained by the kind people on this forum. I can't get my head around exactly how this combination of functions work together, but I think that it could be done this way.

    I was wondering if anyone could help me apply INDEX, SMALL and IF properly to this problem, or perhaps there is a better way?

    Thank you in advance.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    09-25-2015
    Location
    Milan Italy
    MS-Off Ver
    office 365
    Posts
    1,781

    Re: Sorting mixed list into two separate lists (INDEX-SMALL-IF)

    Data

    B4=IFERROR(INDEX('Source Data'!B$3:B$52,AGGREGATE(15,6,ROW('Source Data'!B$3:B$52)-ROW('Source Data'!B$3)+1/('Source Data'!$C$3:$C$52=TRIM(SUBSTITUTE('Desired Output'!$B$3,"Employees",""))),ROWS('Source Data'!$B$3:'Source Data'!B3))),"")

    Copy across and down


    e4=IFERROR(INDEX('Source Data'!B$3:B$52,AGGREGATE(15,6,ROW('Source Data'!B$3:B$52)-ROW('Source Data'!B$3)+1/('Source Data'!$C$3:$C$52=TRIM(SUBSTITUTE('Desired Output'!$E$3,"Employees",""))),ROWS('Source Data'!$B$3:'Source Data'!B3))),"")

    copy across and down
    Attached Files Attached Files

  3. #3
    Forum Expert
    Join Date
    07-06-2004
    Location
    Northern California
    MS-Off Ver
    2K, 2003, 2010, O365
    Posts
    1,490

    Re: Sorting mixed list into two separate lists (INDEX-SMALL-IF)

    Do you have to do this by formula?

    Applying an autofilter to the original table plus the row above it, filter on the 2nd column being Casual, select the filtered records, copy, and paste into the other worksheet. Then switch the filter to Regular and repeat the subsequent steps.

    If you have Office 365, you should have the new FILTER function, so you could just enter

    Desired Output'!B4:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Desired Output'!E4:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    01-07-2018
    Location
    UK
    MS-Off Ver
    Office 365
    Posts
    39

    Re: Sorting mixed list into two separate lists (INDEX-SMALL-IF)

    Hi,

    Thank you so much for this CARACALLA. I'm really sorry, but when I see your solution, I realise that there is a slight change I need to make to the example spreadsheet. I wonder would you mind looking at the updated version?

    Apologies for the revision.

    Thank you again.

    Kind regards

    George
    Attached Files Attached Files
    Last edited by nunez100; 10-19-2020 at 07:56 AM.

  5. #5
    Registered User
    Join Date
    01-07-2018
    Location
    UK
    MS-Off Ver
    Office 365
    Posts
    39

    Re: Sorting mixed list into two separate lists (INDEX-SMALL-IF)

    Hi,

    Thank you for the filter suggestion, but in this case I think I do need it to be a formula. Thank you

  6. #6
    Forum Expert
    Join Date
    09-25-2015
    Location
    Milan Italy
    MS-Off Ver
    office 365
    Posts
    1,781

    Re: Sorting mixed list into two separate lists (INDEX-SMALL-IF)

    Desidered Output


    B4=IFERROR(INDEX('Source Data'!$B$3:$B$52,AGGREGATE(15,6,ROW('Source Data'!$B$3:$B$52)-ROW('Source Data'!$B$3)+1/('Source Data'!$C$3:$C$52="casual"),ROWS('Source Data'!$B$3:'Source Data'!$B3))),"")

    Copy down


    E4=IFERROR(INDEX('Source Data'!$B$3:$B$52,AGGREGATE(15,6,ROW('Source Data'!$B$3:$B$52)-ROW('Source Data'!$B$3)+1/('Source Data'!$C$3:$C$52="regular"),ROWS('Source Data'!$B$3:'Source Data'!$B3))),"")

    Copy down
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    01-07-2018
    Location
    UK
    MS-Off Ver
    Office 365
    Posts
    39

    Re: Sorting mixed list into two separate lists (INDEX-SMALL-IF)

    Thank you so much!!!!! Working perfectly thanks!

  8. #8
    Forum Expert
    Join Date
    09-25-2015
    Location
    Milan Italy
    MS-Off Ver
    office 365
    Posts
    1,781

    Re: Sorting mixed list into two separate lists (INDEX-SMALL-IF)

    You are welcome

+ 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. One big list sorted into small lists
    By levpn in forum Excel General
    Replies: 2
    Last Post: 10-30-2017, 03:08 PM
  2. How To Separate Numbers Mixed with Text in separate Colum
    By muhammad.haq1974 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-19-2016, 07:58 PM
  3. Replies: 6
    Last Post: 11-17-2015, 10:11 AM
  4. A column with mixed item list needs to be sorted out in separate columns
    By vishal karmocha in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 05-27-2014, 06:21 PM
  5. Generate a separate small list from a large list
    By bprice in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 03-06-2012, 11:25 PM
  6. Replies: 6
    Last Post: 01-26-2012, 10:02 PM
  7. Formula for sorting items into 2 separate lists?
    By Gringo123 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-30-2011, 05:39 PM

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