I am trying to make a timesheet for my job, and have it add the hours worked for each project. I have something like the table below:[TABLE="width: 500"]
[tr][td]DAY
[/td][td]HOURS WORKED
[/td][td]PROJECT
[/td][/tr][tr][td]monday
[/td][td]8
[/td][td]project a
[/td][/tr][tr][td]tuesday
[/td][td]8
[/td][td]project b
[/td][/tr][tr][td]wednesday
[/td][td]8
[/td][td]project b
[/td][/tr][tr][td]thursday
[/td][td]8
[/td][td]project a
[/td][/tr][tr][td]friday
[/td][td]8
[/td][td]project c
[/td][/tr][tr][td]saturday
[/td][td][/td][td][/td][/tr][tr][td]sunday
[/td][td][/td][td][/td][/tr]
[/TABLE]
(sometimes we work saturday and sunday)
and I'm trying to get vba to spit out in a cell below something like the following:
[TABLE="width: 500"]
[tr][td]Project a (16), project b, (16), project c (8)
[/td][/tr]
[/TABLE]
I've tried to go down the PROJECT column and if the project name repeats, then it adds the hours worked. But when I do that, I get something like Project a (16), Project b(16), Project b(16), Project a (16), project c (8)
Does anyone have any ideas that could help?
I'm sorry if it sounds confusing.