formulae using blank cells

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
 
D

Dave R.

If In-date is in A2, discharge date (or not) in B2, try;

=MAX(B2,TODAY())-A2

Then format as desired.
 
A

Arvi Laanemets

Hi

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

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

Andy B

Hi

For 'blank' you could use =0 or =""
=IF(discharge_date="",TODAY()-admitted_date,discharge_date-admitted_date)
 
D

Dave R.

Sorry!! major screw up on my part!! Dont use that MAX thing, instead try.


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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top