+ Reply to Thread
Results 1 to 10 of 10

Sorting based on matching characteristics?

Hybrid View

  1. #1
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Sorting based on matching characteristics?

    Hi again

    I am trying to understand your logic here...

    I would like one last column to be a "new bin number" for each object. If the combined characteristics column of a given object is unique in the list, I want "bin new" to not change. If the combined characteristics column of a given object is not unique, but the matching object has the same value for the original bin number as the object in question, then "bin new" again does not change. If, however, there are matching objects in other bins, I need "bin new" for that object to return the lowest "old bin" value of all of the matching objects.
    can you walk me through a few examples of how you arrived at the values you did? (keep it simple lol, its getting later here)
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  2. #2
    Registered User
    Join Date
    02-01-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Sorting based on matching characteristics?

    @FDibbins - Alrighty! I realize now that I was unclear about what the scenario is. Consider the following: binsort1_unique.xls

    I have a bunch of objects in a list. Each object has a unique number (column A), and each object is contained in a bin (column B); as you can see, each bin can hold multiple objects. Each object has several defining characteristics, and in this example I have chosen color and shape (columns C and D).

    When all objects are entered in, I want to be able to sort them in various ways. I want to keep the bins in order so that the first objects in the list are still in bin 1, the next objects are still in bin 2, etc. so I first sort by bin and then by whatever else I want. That's all well and good for when every object is unique, as in the above example. However, this changes when I have duplicate items.

    Here is another example: binsort1_nonunique.xls

    It is similar to the previous example, except now I have duplicate items (objects 1, 3, 5, and 9 are blue circles, for example). When I go to sort, I still want the bins to stay in order, however I need duplicate items to be placed among the bin group containing the earliest instance of that item. For the objects above, it would look something like this: binsort1_nonunique_sorted.xls

    I still need the freedom to be able to sort the objects in each bin based on whatever characteristic I want, so having a "bin new" column seems like the best way to help with that. Unique items would keep their old bin number, and duplicate items would be assigned the lowest old bin number of all the items in the matching item set.

    So for the unsorted list (the second file in this post), the addition of the "bin new" (column F) would look like this: binsort2_nonunique.xls

    And the sorted list (third file here) would look like this: binsort2_nonunique_sorted.xls

    Continued on next post due to attachment limit.
    Last edited by qwea; 02-02-2013 at 11:37 AM. Reason: As per Forum Rule #12, please don't quote whole posts unless necessary -- it's just clutter.

+ 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