To sum the third column (numbers o companies) I've used this  

`=SUM(1/COUNTIF(Names;Names))` 

Names is name of array in C column and CTRL+SHIFT+ENTER and it works perfectly. 

Now I'd like to sum earnings but only for each company once and with the latest data. For example, the result shoud be like this 

`=C4+C6+C7+C8+C9+C10`  

 (93)

Thanks

```

        A     B         C         D 
1    #  company    earnings  date
2    1    ISB       12    10/11/2011
3    2    DTN       15    11/11/2011
4    3    ABC       13    12/11/2011
5    4    ISB       17    13/11/2011
6    5    RTV       18    14/11/2011
7    6    DTN       22    15/11/2011
8    7    PVS       11    16/11/2011
9    8    ISB       19    17/11/2011
10   9    ANH       10    18/11/2011
Sum        6        93

```