none
Big Range, I want limited distinct of X column RRS feed

  • General discussion

  • Using VBA, I could read a column of distinct values from Excel range by adding each of them to dictionary since it rejects the duplicates. Now that I have .NET powers in my hands, I believe there is some smarter way, but what?

    So, I have three columns. First of them has to match criteria 1 (simply an IS type, without anything extra), so does the third of them. I want the distinct of the second column. So in SQL it is something like:

    SELECT DISTINCT Column2 WHERE Column1=Criteria1 AND Column3=Criteria2

    So with .NET, I can use LINQ. What do I need in order to use LINQ against Object array (which is what is created when I assign the source range from Excel into an array)? Or, what else can I use to do it? The slowest accepted solution is to go by the "rejecting dictionary"-approach mentioned above.

    Tuesday, October 22, 2013 1:59 PM

All replies