+ Reply to Thread
Results 1 to 9 of 9

Problem to separate in two different groups or columns with criteria

  1. #1
    Registered User
    Join Date
    12-12-2013
    Location
    Alberta, Canada
    MS-Off Ver
    Excel 2007
    Posts
    7

    Problem to separate in two different groups or columns with criteria

    Hi there,

    I'm a newbie. Tried to sort this matter out into two different groups (Big and Small) in two worksheets or columns.

    1 Size Items
    2 Big Beef Pig Chicken
    3 Small Pig Chicken Beef
    4 Small Chicken Beef Pig
    5 Big Pig Beef Chicken

    E.g. In A2 row, if items is "Big", I want them paste to E2-H2 column or New worksheet by "Big" items only automatically. Same as "Small" (I2 - L2).

    So, the result would be

    2 Big Beef Pig Chicken Small Pig Chicken Beef
    3 Big Pig Beef Chicken Small Chicken Beef Pig

    Many thanks for help!!
    wichiu1

  2. #2
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Problem to separate in two different groups or columns with criteria

    Put:
    =IF(SMALL(IF($A$2:$A$5="Big",ROW(A$2:A$5)-1,100),ROW(A1))=100,"",INDEX(A$2:A$5,SMALL(IF($A$2:$A$5="Big",ROW(A$2:A$5)-1,100),ROW(A1))))
    in E2 as an array formula (confirm with ctrl+shift+enter) and then copy across to H2 and likewise in I2 with:
    =IF(SMALL(IF($A$2:$A$5="Small",ROW(A$2:A$5)-1,100),ROW(A1))=100,"",INDEX(A$2:A$5,SMALL(IF($A$2:$A$5="Small",ROW(A$2:A$5)-1,100),ROW(A1))))

  3. #3
    Registered User
    Join Date
    12-12-2013
    Location
    Alberta, Canada
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Problem to separate in two different groups or columns with criteria

    According to the formula, it shown "Big" word on E2 and what about the rest of items?

  4. #4
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Problem to separate in two different groups or columns with criteria

    Hi have you autofilled E2 across to H2?

  5. #5
    Registered User
    Join Date
    12-12-2013
    Location
    Alberta, Canada
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Problem to separate in two different groups or columns with criteria

    Brilliant. I got! How about E3 or if I input more items into A6 and down, will it be possible to make them automatically appeared at E column cells?

  6. #6
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Problem to separate in two different groups or columns with criteria

    Hi - if you autofill down to to row 3 it will pick up the next record.

    If you have more items, then you need to change the $A$2:$A$5 type references to cover the size of your table, perhaps:
    =IF(SMALL(IF($A$2:$A$500="Big",ROW(A$2:A$500)-1,100),ROW(A1))=100,"",INDEX(A$2:A$500,SMALL(IF($A$2:$A$500="Big",ROW(A$2:A$500)-1,100),ROW(A1))))

    which would work for a table up to row 500.

  7. #7
    Registered User
    Join Date
    12-12-2013
    Location
    Alberta, Canada
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Problem to separate in two different groups or columns with criteria

    I did. But start from the E3-H3 and down, all the cell shown #NUM!

  8. #8
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Problem to separate in two different groups or columns with criteria

    Hi - I do not think you have followed correctly, please take a look at the attachment for an example.
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    12-12-2013
    Location
    Alberta, Canada
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Problem to separate in two different groups or columns with criteria

    Wow... A++++ It works prefect! Many thanks for your help
    Last edited by wichiu1; 01-09-2014 at 10:17 AM.

+ 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. [SOLVED] Trying to set up a formula that will allow selection criteria from 2 separate columns
    By mmckay3 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 05-06-2013, 09:38 AM
  2. Lookup value based on 2 criteria in 2 separate columns
    By mattadler22 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-17-2013, 05:59 PM
  3. Macro/Script for Moving Groups of Data in to Separate Columns
    By JustinSxcel in forum Excel Programming / VBA / Macros
    Replies: 23
    Last Post: 07-05-2012, 01:56 AM
  4. [SOLVED] How do I count data with criteria from two separate columns in exc
    By Scott in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-02-2006, 12:25 AM
  5. Sumif with criteria in two separate columns
    By Pia in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-23-2005, 12:41 AM

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