Forum Discussion

Lawrence Drennan's avatar
Lawrence Drennan
Copper Contributor
Sep 14, 2018

Using the IF function

Hello, I am new here and hoping that someone can help what is likely a basic question.  Here is the formula I am using for what I will describe.  It does not result in exactly what I want but it is as far as I have gotten:  =IF(E4=H4|"U"|"I").

 

It is true that I want "I" to be displayed if the statement is not true.  However, it is only true to a point.  Beyond this point I want the cell result to be a "G".  There are three possibilities that I want displayed (either a "U", "I" or "G"). 

 

So in essence if E4=H4 then I want "U" displayed.  If it is > than that value but less than a value derived from another cell, I want "I" displayed.  Beyond the previous range I would like the cell to display "G".

 

I have attached a sample of the file in question.  I would really appreciate any suggestion.  Thanks in advance for any help!!

 

    

4 Replies

    • Lawrence Drennan's avatar
      Lawrence Drennan
      Copper Contributor

      Ok Sergei, your suggestion has let me to what I needed.  I changed the formula slightly to:

      =IF(E4=H4|"U"|IF((E4>H4)*(E4<=I4)|"I"|"G"))

      and have obtained the correct results.  Thank you for the Lesson!

      • SergeiBaklan's avatar
        SergeiBaklan
        Diamond Contributor

        Lawrence, you are welcome. Just in case, if you manipulate with data in the same row within the table better to use structured references. Your formula will be like

        =IF([@RESULT]=[@MDL],"U",IF(([@RESULT]>[@MDL])*([@RESULT]<=[@PQL]),"I","G"))

        and attached

Resources