+ Reply to Thread
Results 1 to 10 of 10

UDF to List Unique Values Unsorted within a table

  1. #1
    Registered User
    Join Date
    10-19-2015
    Location
    Sydney, Australia
    MS-Off Ver
    2013
    Posts
    10

    UDF to List Unique Values Unsorted within a table

    Hi,

    I have been using this UDF to get a list of sorted unique values from a field BATCH in a table TRANSACTIONS in a separate sheet -

    Please Login or Register  to view this content.
    In a separate sheet, I just copy this formula =FilterUniqueSort(Transactions[Batch],ROW(AD1)) down as many rows as necessary, and because unlike most UDFs, the formula doesn't need to be pasted inside an array, so I can use the results as another table (array formulas don't work in tables). It's been working great for the last 10 months, but if there are more than a few thousand records, it can be quite slow.

    I want to speed up the processing by removing the sorting function, and I have tried to edit the VBA so it no longer sorts, but with no success. Does someone know how to remove the sorting function from the VBA? I would be really appreciative. I spent 3 hours last week trawling google (including this forum) for alternate code, but with no success.

    Thanks in advance for your assistance,
    Stuart
    Last edited by stu40; 10-26-2015 at 12:21 AM.

  2. #2
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,588

    Re: UDF to List Unique Values Unsorted within a table

    That might be the code from

    http://www.ozgrid.com/forum/showthread.php?t=159113

    If no need to sort then change to
    Please Login or Register  to view this content.

  3. #3
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,892

    Re: UDF to List Unique Values Unsorted within a table

    May be
    Please Login or Register  to view this content.
    < ----- Please click the little star * next to add reputation if my post helps you
    Visit Forum : From Here

  4. #4
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,588

    Re: UDF to List Unique Values Unsorted within a table

    YasserKhalil

    This is the second time you did such thing without referring to the original code.

    That will never speed up the process. Don't do it according to your poor GUESS.

  5. #5
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,892

    Re: UDF to List Unique Values Unsorted within a table

    Mr. Jindon
    Sorry for that but I just like to offer any help and I don't need to speed up process ..
    It is just I was helped in the forum so I like to offer help to others .
    Another point .. I already found your UDF function in my library so I posted it as a kind of help
    As for the original code ..in fact I don't keep names I just keep the codes in my wallet
    Sorry again if I disturbed you

  6. #6
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,588

    Re: UDF to List Unique Values Unsorted within a table

    Quote Originally Posted by stu40 View Post
    I want to speed up the processing by removing the sorting function, and I have tried to edit the VBA so it no longer sorts, but with no success.
    And the code was not posted in this forum.
    Last edited by jindon; 10-26-2015 at 03:16 PM.

  7. #7
    Registered User
    Join Date
    10-19-2015
    Location
    Sydney, Australia
    MS-Off Ver
    2013
    Posts
    10

    Re: UDF to List Unique Values Unsorted within a table

    Hi Jindon,
    Thanks for your reply. Your code did more than double the processing speed, but unfortunately it outputs duplicates (ie. not just the unique values). Do you have any other ideas?

    Hi YasserKhalil,
    Thank you for your reply too, but your code results in an output of #NAME? down the column.

    Kind regards,
    Stuart

  8. #8
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,588

    Re: UDF to List Unique Values Unsorted within a table

    OOps
    Please Login or Register  to view this content.
    should be
    Please Login or Register  to view this content.

  9. #9
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,588

    Re: UDF to List Unique Values Unsorted within a table

    And let's see if this is faster
    Please Login or Register  to view this content.

  10. #10
    Registered User
    Join Date
    10-19-2015
    Location
    Sydney, Australia
    MS-Off Ver
    2013
    Posts
    10

    Re: UDF to List Unique Values Unsorted within a table

    Hi Jindon,

    That new code you posted is almost 4 times faster than my original code, and it only displays unique values unsorted. I really appreciate your assistance!

    Thank you,
    Stuart

+ 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. Formula to Return certain Values from Unsorted Table
    By cakonopka in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 09-10-2015, 04:48 PM
  2. Grouping data according to unique user ID in an unsorted Excel 2010 table
    By Rogervanduffel in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 03-19-2015, 06:02 AM
  3. [SOLVED] make list of values corresponding to unique values in parallel list
    By johnandrews in forum Excel General
    Replies: 3
    Last Post: 11-18-2014, 09:46 AM
  4. [SOLVED] Extract unique values from a table and list along a row
    By doctorblyth in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 11-05-2013, 04:33 PM
  5. create a "live" input table for product prices from a list of automatic unique values
    By andymcnichol in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 09-11-2012, 06:13 AM
  6. 3 columns: None contain unique values, but I need a list of every unique set
    By mathematician in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 06-15-2012, 04:47 PM
  7. macro to generate sorted table from unsorted list?
    By JGCA in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-14-2009, 11:36 AM

Tags for this Thread

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