+ Reply to Thread
Results 1 to 2 of 2

returning a unique kth small({},k) value?

  1. #1
    Registered User
    Join Date
    05-14-2012
    Location
    boston, ma
    MS-Off Ver
    Excel 2007
    Posts
    9

    returning a unique kth small({},k) value?

    I'm working on a project and have hit a bit of a stumbling block. I've made a sheet that pulls purchase history from a secondary sheet (from a table named ph[]) where it has to meet multiple criteria(style, quality, and minimum quantity). As of now I'm using the below code to find the row of the match but...
    Please Login or Register  to view this content.
    it's possible, and likely that I might have to check the same style & quality more than once- which will return the same row #. Ideally it shouldn't do this but should instead return the next unique row# from the list.

    My issue is now that anything I try results in my trying to check the results of small against the prior results but that only results in an error after the first style because the arrays are not the same size.

    I've resorted to using 'COUNTIFS()' but that is logically flawed as I'm either stuck matching the quantity exactly or ignoring it when I could have small(,1) return different values for the same style and quality.
    Last edited by y_t; 05-14-2012 at 04:53 PM.

  2. #2
    Registered User
    Join Date
    05-14-2012
    Location
    boston, ma
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: returning a unique kth small({},k) value?

    I think I might have found a solution, however convoluted...
    Using the frequency function I can figure out if a value has been used by checking it against the frequency, by moving the bins down by one. I'm not sure if I'm missing anything and it will take some further testing to confirm if this works all the time, it works for subsequent checks though I'm unsure if I've overlooked anything. Here is the sheet if you are curious or want to double check my work. Column F is the check to see if the small({},1) hasn't been used. Column G is the #k I should use to get the smallest unique value. the other blank columns were for other methods I tried without success; I just didn't clean it up beyond what I needed to get the proper solution, or what I think is.
    Attached Files Attached Files

+ 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