Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am trying to write a formula such that, if T5 is 1, and AB5 is 1, then LOW;
OR if T5 is 1, and AB5 is 2, then HIGH;
OR if T5 is 1, and AB5 is 3, then EMERGENCY

etc., for the whole chart..... T5 is from 1-4, AB5 is from 1-4

   \ AB5  1          2          3           4
T5 \ ------------------------------------------------
1         LOW        HIGH       EMERGENCY   EMERGENCY
2         LOW        LOW        HIGH        EMERGENCY
3         NO ALARM   LOW        HIGH        HIGH
4         NO ALARM   NO ALARM   LOW         HIGH
share|improve this question
add comment

2 Answers

Assuming that your data table is in A1:D4 (A1 = LOW, D4 = HIGH), you can simply use this formula:

=INDEX($A$1:$D$4,T5,AB5)
share|improve this answer
add comment

I’m not sure whether I understand your problem and what you want from us, but here’s something: If you’re willing to define a “helper value” (let’s call it “tmp”) to the following value:

=(6 - 2*T5 + 3*AB5) / 4

then you can get the result you seem to want with the formula

=IF(tmp <= 1, "NO ALARM", IF(tmp <= 2, "LOW", IF(tmp <= 3, "HIGH", "EMERGENCY")))

share|improve this answer
    
Or combine the two formulas into the rather messy =IF(((6 - 2*T5+ 3*AB5) / 4)<= 1, "NO ALARM", IF(((6 - 2*T5+ 3*AB5) / 4)<= 2, "LOW", IF(((6 - 2*T5+ 3*AB5) / 4)<= 3, "HIGH", "EMERGENCY"))). –  chuff Apr 18 '13 at 22:44
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.