Re: Duplicate dates

From: Dummy Here (dumbass_at_keepthespam.com)
Date: 10/29/04


Date: Fri, 29 Oct 2004 19:03:19 -0400


Why not check the array first before inserting a duplicate? If you are
using a hashtable you can use the .Contains() method to see if the item is
already there.

Trond wrote:

> I have been trying to fig out how to build up an array with dates. When
> its generated i want to be able to remove duplicate dates. The dates is
> generated by FileInfo object that is scanning a folder for files.
> Here is some code for that. In this case i am only using a variable not an
> array.
>
> _info = new FileInfo(_fileName);
> base.Text = _info.LastWriteTime.ToShortDateString();
>
> As i see it i must first generate the array with dates. Then create
> another array an put the values from array 1 into it one by one. I tested
> with StringCollection object. But i'm stuck. I kant fig out how to do it.
> Are there someone that have some code that can show me how to remove
> duplicate dates from my array?
>
> Best regards
> Trond



Relevant Pages

  • Re: Repost (Comparing two ranges)
    ... I was on the right track assuming a countif type function instead of ... The result does not take into account the duplicate ... Is there a way to compare two ranges where you can create an array ... Remember I want to put it into a SUMPRODUCT function. ...
    (microsoft.public.excel.worksheet.functions)
  • RE: Speed up Array Transfer to Dictionary
    ... of comparisons every time you have a known duplicate. ... array with themselves. ... array in the first place as a dictionary cannot have duplicate keys. ... dupe = dupe + 1 ...
    (microsoft.public.excel.programming)
  • Re: Repost (Comparing two ranges)
    ... range A2:A6 to drive data validation dropdown boxes in the range B9:D11. ... The result does not take into account the duplicate ... Is there a way to compare two ranges where you can create an array ... Remember I want to put it into a SUMPRODUCT function. ...
    (microsoft.public.excel.worksheet.functions)
  • Re: Repost (Comparing two ranges)
    ... The result does not take into account the duplicate ... Is there a way to compare two ranges where you can create an array ... Remember I want to put it into a SUMPRODUCT function. ... to create the boolean data above? ...
    (microsoft.public.excel.worksheet.functions)
  • Re: How to return cell reference
    ... Well.....these array formulas seem to work fine with duplicate ... First instance of "John" in A1:M10 ... With Dupe Cells: C3 and A6 ...
    (microsoft.public.excel)