**State of Data:** I have column A which has names of employes and column B has number of hours. How do I add the hours if column A contains same employee surname more than once?

I have been using what I expected to have worked, the following Formula im using should work, but I dont understand why it isnt?

Formula: `=SUMIF($A$2:$B$79,A2,$B$2:$B$79)`

Obviously I have 79 rows worth of data, so I'll be drilling down the formula to the other cells, which is why i haven't anchored `A2`

.

So what am I doing wrong here?, is there a better more efficient way of calculating this?

**Added Info:** for example if I have an employee in column A who goes by the name of `Richard`

, his name has appeared in `column A`

3 times values are in `column B`

as `3,4,9`

So I would like to have a total in column C with Richards name in column D for example stating that he has done a `total of 16 hours`

.