Hi there

I've been looking through lots of other answers posted elsewhere on the Net - not wishing to reinvent the wheel - but I just can't come up with the correct function phrase for my needs.

I've four columns in a worksheet for the purposes of the example call them A, B, C, and D

In column A I have contract numbers - there can be multiple contract numbers in this column interspersed with blank rows (I'd rather not go to complication of removing these if I can help it, UNLESS I can retain the contents of column B alongside its respective Column A entry)

In column B for every contract entry there is hours spent on the contract, i.e. as many Column B rows as there are column A rows (again with matching blank rows).

Using some neat array formulas I picked up from cpearson.com Column C contains every unique contract number with no blank rows, i.e. it is a far shorter list than column A starting at row C2.

What I would now like for column D is for every unique contract in Column C some sort of VLOOKUP? combined with SUM? function/statement which will look up all the times (from a lookup range of column A and B) and add them together and put the total time against the contract number.

Does this make sense and is it possible please? If I've got to do something with the blank rows can someone please help me keep the rows in columns A & B together?

If its any help I've done things so that Column A & B have total length of 190 rows (which won't be exceeded) including a header row.

Many thanks

Julia