Hi.

I am new to VBA but have other programming experience. I have been asked to create a macro to automate a manual process. This has been going fine until I hit this stumbling block.

Any help, or a link to an existing solution would be gratefully received.

Jack 10
Jill 10
Peter 2
Peter 2
Peter 2
Peter 2
Peter 2
Patricia 5
Patricia 5
James 10

An employee (Column A) records the amount of time spent on each individual task (Column B). If they have only worked on a single task, they will only have one row. If they have worked on six individual tasks, they will have six rows.

There is no limit to the number of tasks they may have performed. Similarily, there is no special time value that they may have spent on any individual task. The number of different employees listed may also differ in different scenerios.

What is the VBA macro that will sum all the hours spent by an employee on all his individual tasks, then leave only one row per employee?

In the above example of input data, I would expect to see an output of:
Jack 10
Jill 10
Peter 10
Patricia 10
James 10
Many thanks in advance.