vertabatim
New Member
- Joined
- Oct 2, 2020
- Messages
- 2
- Office Version
- 2016
- Platform
- Windows
Hello,
For a document at work I need to calculate the total days that we have had someone stay at our property. Something that should look like below.
So my "logic" to calculate is
IF A1 is not blank AND E1 is Blank then DATEDIF(c1,now(),"d")
Otherwise
IF A1 is not blank and E1 is not blank then DATEDIF(c1,e1(),"d)
I am really struggling to get my head around the multiple isblank or not(isblank) functions.
Current work in progress is
=IFERROR(OR(IF(ISBLANK(A1),"",(DATEDIF(A1,E1,"d"))),""),(IFERROR(IF(ISBLANK(A1),"",(DATEDIF(C21,NOW(),"d"))),"")))
Hoping there is a much easier way to do this...
Hopefully this makes enough sense as my brain is slowly losing function the more I stare at this.
Regards,
For a document at work I need to calculate the total days that we have had someone stay at our property. Something that should look like below.
Room | Room (per person) | Date in | Planned Date Out | Actual Date Out | Total Nights |
1511 | 1511 | 25/09/2020 | 9/10/2020 | 7 | |
1511 | 25/09/2020 | 9/10/2020 | |||
302 | 302 | 23/09/2020 | 07/10/2020 | 24/09/2020 | 1 |
2121 | 2121 | 10/09/2020 | 24/09/2020 | 07/10/2020 | 14 |
2121 | 10/09/2020 | 24/09/2020 | 07/10/2020 |
So my "logic" to calculate is
IF A1 is not blank AND E1 is Blank then DATEDIF(c1,now(),"d")
Otherwise
IF A1 is not blank and E1 is not blank then DATEDIF(c1,e1(),"d)
I am really struggling to get my head around the multiple isblank or not(isblank) functions.
Current work in progress is
=IFERROR(OR(IF(ISBLANK(A1),"",(DATEDIF(A1,E1,"d"))),""),(IFERROR(IF(ISBLANK(A1),"",(DATEDIF(C21,NOW(),"d"))),"")))
Hoping there is a much easier way to do this...
Hopefully this makes enough sense as my brain is slowly losing function the more I stare at this.
Regards,