Bonnie Janes
New Member
- Joined
- Apr 27, 2017
- Messages
- 36
Hi guys, looking to you for help with my complicated IF/AND/OR formula. I don't seem to be able to get it it work quite how I want.
I need a cell that looks at dates and returns whether a line is, previous, current, due or overdue. Previous means there is a more recent entry, current means it's the most recent appearance, due means due within 3 months and overdue means overdue. I think the complication is occurring because the services have been done early, due in June but completed in May.
There are also a couple of overwrites "no access" and "building site" which take priority.
Where am I going wrong?
$P$1 is the current date
L28 is service due date
K28 is previous service date
M28 shows 3 month due date window (this is working fine)
=IFERROR(IF(B28="No Access","No Access",IF(B28="Building Site","Building Site",IF(AND($P$1>=L28,$P$1<=K28),"Overdue",IF(AND($P$1>=M28,$P$1<=L28),"Due",IF(AND($P$1>=K28,$P$1<=M28),"Current","Previous"))))),"")
Apologies if I've explained this badly, please ask for any clarification.
Thanks in advance for your help.
xx
I need a cell that looks at dates and returns whether a line is, previous, current, due or overdue. Previous means there is a more recent entry, current means it's the most recent appearance, due means due within 3 months and overdue means overdue. I think the complication is occurring because the services have been done early, due in June but completed in May.
There are also a couple of overwrites "no access" and "building site" which take priority.
Where am I going wrong?
$P$1 is the current date
L28 is service due date
K28 is previous service date
M28 shows 3 month due date window (this is working fine)
=IFERROR(IF(B28="No Access","No Access",IF(B28="Building Site","Building Site",IF(AND($P$1>=L28,$P$1<=K28),"Overdue",IF(AND($P$1>=M28,$P$1<=L28),"Due",IF(AND($P$1>=K28,$P$1<=M28),"Current","Previous"))))),"")
Type | Status | Discipline | Service Date | Status should be showing : |
Service | Overdue | Fire Alarm | 09/02/2022 | Previous |
Service | Overdue | Fire Alarm | 11/02/2022 | Previous |
Service | Overdue | Fire Alarm | 11/05/2022 | Previous |
Service | Overdue | Fire Alarm | 25/05/2022 | Previous |
Service | Overdue | Fire Alarm | 08/06/2022 | Previous |
Service | Overdue | Fire Alarm | 31/10/2022 | Previous |
Service | Overdue | Fire Alarm | 04/11/2022 | Previous |
Service | Overdue | Fire Alarm | 09/12/2022 | Previous |
Service | Overdue | Fire Alarm | 09/12/2022 | Previous |
Service | Overdue | Fire Alarm | 09/12/2022 | Previous |
Service | Due | Fire Alarm | 17/02/2023 | Due - correct |
Service | Previous | Fire Alarm | 09/05/2023 | Current |
Service | Previous | Fire Alarm | 10/05/2023 | Current |
Service | Previous | Fire Alarm | 12/05/2023 | Current |
Service | Previous | Fire Alarm | 19/05/2023 | Current |
No Access | No Access | Fire Alarm | 16/06/2023 | No Access - correct |
Apologies if I've explained this badly, please ask for any clarification.
Thanks in advance for your help.
xx