I am in charge of keeping track of tanks at my work, I am trying to create a report that will tell me the next scheduled move for each tank.
The IF formula will show the next scheduled date, only if that date is in the future. Now if the last scheduled move has taken place, I want the formula to display either "Move Soon" or "MUST move".
"MUST Move" if Today()-last move >=7
"Move Soon" if Today()-last move <7
There are three possible last moves:
- Date it is coming into the port
- Date it clears Customs
- Date it arrives at plant
If there is no date listed I want it to display the comment cell for the tank.
I tried creating a formula, and was pretty close, but doesn't work for one of the possible scenarios, so
First, I made it look at the "arrive at plant" date, if there was a date input and wasn't "0", it did it's thing. If it was "0", it looked at Customs date,....and so on. And like I said, it looks at Plant date, then Customs date, then Port date. If there isn't a date in the last date it looks at, Port, then it shows the comment cell.
Here is a visual:
..........A............B..............C..............D...............E
1...................................PORT........6/13/08................
2.................................CUSTOMS....6/15/08................
3..................................PLANT.......6/25/08................
4............................................................................
5.............................................................................
6............................................................................
7................comment........................................IF formula
In E7, I have the following formula:
=IF(D1>TODAY(),D1,IF(D2>TODAY(),D2,IF(D3>TODAY(),D3,IF(D3=0,IF(TODAY()-D2>=7,"MUST move",IF(D2=0,IF(TODAY()-D1>=7,"MUST move",IF(D1=0,B7,"Move Soon")),"Move Soon")),IF(TODAY()-D3>=7,"MUST move","Move Soon")))))
With the formula above and the dates above, the value returned should be "6/25/08", because that is the next move, in the future.
But lets say today is July 7th, then the difference between the last move, 6/25/08 and 7/7/08, is greater than 7, so it should display "MUST move".
The problem I have is that when no dates are entered in any of the three date cells, it returns "MUST move". It should return the comment cell.
I attached a sample spreadsheet with what I am trying to describe above.
Please play around with the dates and see what I mean.
PLEASE HELP ME OUT!! ANY QUESTIONS, PLEASE DON'T HESITATE TO ASK!!
Bookmarks