Lets say that A1:B7 houses the following sample:
{"Dates","Acc Nums";
37258,"acc1";
37258,"acc2";
37258,"acc1";
37289,"acc3";
37289,"acc3";
37317,"acc1"}
Funny looking numbers are actually dates.
Create a unique list of dates of interest in D from D2 on like the one that follows:
{37258;
37289;
37317}
which is derived from the previous sample of data.
In E2 array-enter:
=SUM(N(FREQUENCY(IF(($A$2:$A$7=D2),MATCH($B$2:$B$7,$B$2:$B$7,0)),MATCH($B$2:$B$7,$B$2:$B$7,0))>0))
In order to array-enter a formula, you need to hit control+shift+enter at the same time, not just enter.
Copy the above formula down as far as needed.
You'll get the following to see in D and E:
{37258,2;
37289,1;
37317,1}
which gives you the number of different accounts that are invoiced on a given date.
Aladin