title: How to sum column-b values while column-a values are the same?
body: <p>I've simulated my problem.. because my original plan is complex to describe:</p>
  
  <p><a href="https://i.stack.imgur.com/mO7T0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/mO7T0.png" alt="enter image description here"></a></p>
  
  <p>I need <code>C4</code> to be <code>8</code> because <code>A2 = A3 = A4</code>, and <code>5 + 2 + 1</code> results in <code>8</code>.</p>
  
  <p>Using this logic, the expected results should be:</p>
  
  <p><code>C4:8    C6:10    C10:23    C12:23</code></p>
  
  <hr>
  
  <p>Well, my problem:</p>
  
  <p>I can't use sumif due after the last day of the month (28, 29, 30 or 31) the next day will be 1 again.</p>
  
  <p>I'm stucked on that. Any help would be appreciated.</p>
  
  <p>Thank you for your time.</p>