You can easily do this by writting a code in vba.
I think you are working with dates.
I have a file no 3 at www.pexcel.com/download.htm
you can see the code for it .. or write me at www.pexcel.com i have a condition programmed file for my
own use see if it is helpful to you.