Ok here it is...

I have to work out the amout of days in Bed and breakfast spent in a month and then divide it by the amount of people in bed and breakfast to get the average amount days per month spent in Bed and Breakfast;

However if someone is in bed and breakfast for more than a month then it becomes very silly indeed.

here is what i have -

First Night Last Night
21/11/2005 30/11/2005
21/11/2005 05/01/2006
22/11/2005 01/12/2005
23/11/2005 23/11/2005

as you can see i have 9 days in November in the first one
but for the second i have 9 days in november but i also have 30 days in december and 5 days in Jan

there are hundreds of these anyone any ideas how I can do this quickly?

thanks in advance

Conan