View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
~L ~L is offline
external usenet poster
 
Posts: 177
Default Need assistance with IF function when calculating dates

Without the first =IF

"~L" wrote:

Just thought of something... B2 could be blank if the move in date is not
known...

So...

=IF=IF(AND(A2<$A$1,OR(B2$A$1,B2="")),"Vacant","Oc cupied")

"~L" wrote:

Okay, assuming Today is in A1, Move out is in column A starting at A2 and
Move In is in column B starting in B2, In Column C:

=IF(AND(A2<$A$1,B2$A$1),"Vacant","Occupied")

"MMangen" wrote:

I have a spreadsheet that I have do the following (that is currently working)

There is a move out date in one column and when we open the sheet it has an
IF function that will tell us if an apartment is vacant or occupied based on
the move out date and today's date. That part is working fine.

However, we have another column in which we can indicate the move in date of
a new person. I can't get the vacant and occupied column to update correctly
based on this date.

Hopefully what I am trying to do works. Here is a scenario that may explain
it better.

Unit A moved out on 11/30/06 so the current formula knows that today is
12/19/06 and therefore knows that based on the current IF statement that the
unit is vacant (and returns "vacant" in the appropriate cell). However, next
step is that the apartment was re-rented as of 12/14/06 so actually it is
occupied.