MS Excel IF THEN formula

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
```
-

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)
```
-

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")))`

-
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