Forum Discussion

Monica Primus's avatar
Monica Primus
Copper Contributor
Feb 16, 2017
Solved

I need help writing a complex formula

I am new at this and am not sure how to word my question.

 

In my workbook titled "Menu Analysis" I have 16 colums.  I need to write a formula that will populate the 13th column with one of four terms if they meet the following criteria:

if D2 is low and L2 is high then "Puzzle"
if D2 is high and L2 is high then "Star"
if D2 is high and L2 is low then "Plow horse"
if D2 is low and L2 is low then "Dog"

 

So, any ideas how I write this in a formula?

 

Any help appreciated,

Monica :-)

3 Replies

    • I'm not a fan of hiding answers in attached spreadsheets, so please allow me to post the approach here, where it can be read without downloading a file. 

       

       

      =IF(D2="Low",IF(L2="High","Puzzle","Dog"),IF(L2="High","Star","Question Mark")

       

      The first (outer) IF statement checks the value of D2. If it is "Low", then the TRUE part of the outer IF statement will be executed, which contains another IF statement that checks L2. In the same vein, when D2 is not "Low", the IF statement in the False part of the outer IF is executed.  

       

      Written in pseudo-code it looks like this:

       

       

      if D2 is low then
          if  L2 is high then
               "Puzzle"
          else
              "Dog"
      else
          if L2 is high then
                "Star"
          else
               "Plow horse"



    • Monica Primus's avatar
      Monica Primus
      Copper Contributor

      Sergei, that is similar to the form I am using. Thank you for finding one with the formulas in it as I had recreated it myself until I got to the Category column.
      Monica

Resources