ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   how do I create or add to a formula . . . (https://www.excelbanter.com/excel-worksheet-functions/37777-how-do-i-create-add-formula.html)

Steph

how do I create or add to a formula . . .
 
Using the admission date in a spreadsheet, I have added a column that counts
the number of days a patient is on service [=today()-B2+1]. Information
regarding the patient stays on the spreadsheet for several days, even if the
patient is discharged. I would like to know if it is possible to add to the
formula, or create another that would stop counting if there is a date
entered in the discharge column.

Bob Phillips

=IF(C2<"",C2-B2-1,TODAY()-B2-1)

--
HTH

Bob Phillips

"Steph" wrote in message
...
Using the admission date in a spreadsheet, I have added a column that

counts
the number of days a patient is on service [=today()-B2+1]. Information
regarding the patient stays on the spreadsheet for several days, even if

the
patient is discharged. I would like to know if it is possible to add to

the
formula, or create another that would stop counting if there is a date
entered in the discharge column.




Steph

Thanks, Bob. The only change I had to make was a +1 instead of a -1, as we
need to count the day of admission as 1 full day.
Steph

"Bob Phillips" wrote:

=IF(C2<"",C2-B2-1,TODAY()-B2-1)

--
HTH

Bob Phillips

"Steph" wrote in message
...
Using the admission date in a spreadsheet, I have added a column that

counts
the number of days a patient is on service [=today()-B2+1]. Information
regarding the patient stays on the spreadsheet for several days, even if

the
patient is discharged. I would like to know if it is possible to add to

the
formula, or create another that would stop counting if there is a date
entered in the discharge column.





Bob Phillips

Doh! You actually said that in your original post.

Bob

"Steph" wrote in message
...
Thanks, Bob. The only change I had to make was a +1 instead of a -1, as

we
need to count the day of admission as 1 full day.
Steph

"Bob Phillips" wrote:

=IF(C2<"",C2-B2-1,TODAY()-B2-1)

--
HTH

Bob Phillips

"Steph" wrote in message
...
Using the admission date in a spreadsheet, I have added a column that

counts
the number of days a patient is on service [=today()-B2+1].

Information
regarding the patient stays on the spreadsheet for several days, even

if
the
patient is discharged. I would like to know if it is possible to add

to
the
formula, or create another that would stop counting if there is a date
entered in the discharge column.








All times are GMT +1. The time now is 06:51 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com