Good responcetime! very nice

I was thinking about making a column of all dates and writing the

corresponding workinghours in the neighbouring column.

Then use the following formula:

sum(vlookup(start_date;date_column:hour_column;2;false):vlookup(end_date;date_column:hour_column;2;false))

The problem is that vlookup returns value and not a reference which is

needed for the formula. Any way around this?

Assuming you only have one entry per date, you could use the MATCH function to

return the positions, and then SUM the hour_column by using something like:

=IF(StartDate>EndDate,"ERROR",SUM(OFFSET(INDIRECT(

CELL("address",HourColumn)),MATCH(StartDate,DateColumn,0)

-1,0,MATCH(EndDate,DateColumn,0)-MATCH(StartDate,DateColumn,0)+1)))

The formula assumes the first row of DateColumn and HourColumn is the first row

with data, and not a label.

The formula will give an #NA if either StartDate or EndDate is not in the list.

Changing match_type to 1 (or deleting it) will have the date default to the

previous existing date, and you'll only get #NA if StartDate is earlier than

the first date in DateColumn.

Ps. I have no knowlegde about macro's, so it could be nice to avoid them, if

at all possible...

--ron