title: VBA excel, concatenate cells when there are duplicates
body: <p>what I have here is a matrix like this</p>
  
  <pre><code>    id  value  
       1   A 
       2   B
       3   C
       1   D 
       3   E
       1   F
  </code></pre>
  
  <p>What I need to do is to sum what I have in the value, having something along the lines of</p>
  
  <pre><code>    id  value  
       1   A, D, F 
       2   B
       3   C, E
  </code></pre>
  
  <p>Removing the duplicated it would be nice to have but not mandatory. 
  I tried with this formula in a third column but...</p>
  
  <pre><code> =IF(COUNTIF(A:A,A1)&gt;1,CONCATENATE(B1,",",VLOOKUP(A1,A1:B999,2)),B1)   
  </code></pre>
  
  <p>VLOOKUP just gives me back ONE value, it means that I cannot handle more than 1 duplicate.</p>
  
  <p>I did try with VBA but it's the first time for me and it's getting complicated, furthermore I cannot find a decent documentation about excel VBA. every suggestion is appreciated. Thanks</p>