formulae using blank cells

  • Thread starter Thread starter Tony Houston
  • Start date Start date
T

Tony Houston

I have a client who wants to record the number of days a
patient occupied a hospital bed.
they record date admitted and date discharged, this is not
a problem but what they also want to record the number of
days a current patient has occupied the bed.

So If there is a discharge date = admitted date -
discharge date but if the discharge date is blank then =
admitted date - today()

How do i create a formula that uses "if blank"?
Thanks Tony
 
If In-date is in A2, discharge date (or not) in B2, try;

=MAX(B2,TODAY())-A2

Then format as desired.
 
Hi

=IF(AdmittedDate="","",IF(DischargeDate="",TODAY(),DischargeDate)-AdmittedDa
te)

NB! I think AdmitteDate must be earlier as DischargeDate!
 
Hi

For 'blank' you could use =0 or =""
=IF(discharge_date="",TODAY()-admitted_date,discharge_date-admitted_date)
 
Sorry!! major screw up on my part!! Dont use that MAX thing, instead try.


=IF(B2="",TODAY(),B2)-A2
 
Back
Top