Quote Originally Posted by daddylonglegs View Post
Hello JBeaucaire,

Wouldn't that give 3 in Jan and 3 in Feb for 28th Jan to 3rd Feb when the stated requirement is 4 and 2?

This formula in F2 copied across and down should give the correct result

=IF($C2="","",MAX(0,MIN(G$1,$C2)-MAX(F$1,$B2)))

You need to always be one month ahead in the header, e.g. if you have dates up to Dec 2009 then you need to include Jan 2010. If you don't want to see zeroes you can format these to show blank
Hi hi, may i ask how should i set the formula if i want to include the end date as well in the calculation?

Please help!!