Date Formula counting days

Closed
Brande74 - Updated on Jun 21, 2018 at 05:46 PM
 Brande74 - Jun 28, 2018 at 10:22 PM
Hello,
If anyone could help me, I would greatly appreciate it, I need help with counting days if there is not an end date on the report.
Ex: Count the days from the admission date to the end of the month I am doing the report if there is no admit date. If there is an admit and discharge date would I just use the DAYS360 formula?
My work wants to know what amount of days a patient was at our hospital from admit date to discharge date but some patients haven't discharged yet so I would want to count the days from admit to the end of the month that I am doing the report. Thanks so much, Greatly appreciate for all ideas.


Related:

5 responses

Blocked Profile
Jun 21, 2018 at 08:30 PM
So, it should calculate daily, or only when you want it to?
At the end of every month would be great.
Blocked Profile
Jun 22, 2018 at 09:51 AM
So it is to figure what day it is, and only act when it finds out is the last day of the month?


Have you turned on the developer tab in Excel yet?
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 555
Jun 26, 2018 at 11:44 AM
Hey Mark, what happened to KISS?

When the admit date is in A1 and the discharge date is in B1:
=IF(B1="",DATE(YEAR(A1),MONTH(A1)+1,0)-A1,B1-A1)

Best regards,
Trowa
Blocked Profile
Jun 26, 2018 at 03:58 PM
Exactly, that is why I asked if the tab was even ready! Nice once again!
What if there is no discharge date and I want to count from the admission date to the end of the month.
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 555
Jun 28, 2018 at 10:44 AM
Hi Brande,

Have you tried the formula?

When you enter for example 14-6-2018 in A1 and leave B1 blank, then result will be 16. When you enter 20-6-2018 in B1 then the result will be 6. Wasn't that what you were after?

Best regards,
Trowa
I will try it tomorrow at work, thanks much.