+ Reply to Thread
Results 1 to 3 of 3

Automatically sorting data according to defined categories

  1. #1
    Registered User
    Join Date
    09-28-2013
    Location
    Herceg Novi, Montenegro
    MS-Off Ver
    Excel 2007
    Posts
    4

    Automatically sorting data according to defined categories

    Hello everyone!

    First I would like to apologize if this problem has been mentioned/solved before, but need help....
    I have two columns, in column A will have four or five categories repeating randomly, in columns B will have unique names.
    What I would like to do is to define categories as a column names in a table and then to automatically fill that table with the data from column B depending on category.

    Please find attached a table, it will be more clear what I would like to do....

    I suppose it cannot be done with pivot tables, so please any help or link to to explanation would be much appreciated.

    Thanks in advance.

    Oliver
    Attached Files Attached Files

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Automatically sorting data according to defined categories

    In E2 put this array formula:

    =IFERROR(INDEX($B$2:$B$14, SMALL(IF($A$2:$A$14=E$1, ROW($A$2:$A$14)-1, ""), ROWS($A$1:$A1))), "")

    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer. Press F2 on that cell and try again.

    Now copy that cell down, then across the rest of the table.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    09-28-2013
    Location
    Herceg Novi, Montenegro
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Automatically sorting data according to defined categories

    Thanks a lot!!!

    I am not very familiar with array formulas, but will try to figure out how this works!

    Thank you for your help!

+ 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. Replies: 5
    Last Post: 02-07-2014, 05:07 AM
  2. Replies: 0
    Last Post: 09-13-2012, 02:40 PM
  3. Adding user defined functions to standard categories
    By avr5iron in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-03-2009, 04:44 PM
  4. Automatically populate a list based on defined categories -- user input varies
    By NearClueless in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-12-2009, 06:05 PM
  5. Assigining User Defined Functions to Categories in Addins
    By Jim in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 06-27-2006, 07:10 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