Q:

excel formula, if, and, or? 

I am making an Excel form to use in housing.   I want to be able to enter a date in one cell (tenancy end date) and calculate the number of days empty in the next cell (void days).   I then have another column with date re-let. 
I have managed to get it so that the void days column will stop calculating when a date is entered in the re-let column.   Every week, I have to report on the number of void days for all the properties - this will be easy if I have a tenancy end date on each line, however, I don't.   This means that when I copy the formula =IF(ISBLANK(J6),TODAY()-H6) onto the next line, excel inputs 42995 - not good when I want to add up that column. 
I found a formula =IF(OR(ISBLANK(J11),ISBLANK(H11)),0,TODAY()-H11) to put a zero in the void days column, HOWEVER, I need it to calculate the number of void days still if there is a date in the tenancy ended column BUT, to stop calculating the number of void days when a date is entered in re-let date.   I use excel by googling a lot, so, I am not an expert, just a good googler! 

A:

Assuming your data is layed out as above, place the following formula in B2 and copy down. 
=IF(A2="","",IF(C2="",TODAY()-A2,IF(C2>=A2,C2-A2,"Re-Let While occupied")))

It will calculate compared to the current date when the the cell in C
is empty 
It will calculate compared to the rel-let date when there is
a value in C
It will leave a blank when the cell in column A is empty
It will toss and error message to you when the end date is larger
then the relet date. 

E2 was simply:
=SUM(B:B)

