• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Nested IF formula problem

kidiowa

New Member
Hopefully this has a simple solution. I'm an informatics nurse and am diving into excel to do a bunch of data mining, and this one formula isn't working for me. What I want to do is have a cell (this column tells me if meds were given early or late) look in another (has the time variance that a med was given), if it is over 60 to put in "LATE", if it is under 60 put in "EARLY", if the cell is blank then leave it blank. This is my formula, what am I doing wrong? The blank cells all have an EARLY when it should be left blank


=IF(G14>60,"Late",IF(G14<60,"Early",""))
 
HI kidiowa,


Welcome to the forums, Try this:


Code:
=IF(ISBLANK(G14)=TRUE,"",IF(G14>60,"Late",IF(G14<=60,"Early","")))


Regards,

Faseeh
 
I bow to your Excel Ninja skills! Worked like a champ. Was the blank portion of my formula the part that was throwing everything off? As a general rule, when dealing with blank cells, is it best to address that issue first in formulas?
 
Hi Kidiowa,


Thank you for these kind remarks! :)


Yes you can check for like if cells is text or number or blank and then add further condition, but it is always a logical arrangement no hard and fast rule. Try these as well:


Code:
=IF(G14<=60,"Early",IF(G14>60,"Late",IF(ISBLANK(G14)=TRUE,"")))


=IF(G14>60,"Late",IF(G14<=60,"Early",IF(ISBLANK(G14)=TRUE,"")))


..hopefully will give you same result.


Regards,
 
Back
Top