Forum Discussion
Nested IF formula in Excel 365
- Apr 22, 2019
please see screenshot and file attached.
The formula that I used is an array formula. To make the formula to work, you need to do CTRL+SHIFT+ENTER after you finish writing it or after you edit it in the formula bar. The formula will get curly brackets at the beginning and ending after you hit those three keys.
Good luck!
You can think of this has a flow chart type of analysis. G5, H5 and I5 are prepopulated with HIGH, MODERATE, LOW.
The logic I'm attempting is a flowchart type layout:
IF G5 LOW AND H5 LOW then Look in cell I5 for value and place the "T", "NT", or OT" in E5
In this case G5 and H5 are LOW and use the following formula to pick which (T, OT, NT) to place in E5
IF (I5="LOW", "T", IF(I5="HIGH", "T", "T"))
Since LOW is in cell I5 , it results in "T" in E5.
Depending on values in G5 and H5...(Low, Low or Moderate,High or High,High...ect) it changes how the Value in I5 is interpreted to place the T, OT, or NT in E5. Sometimes it will seem redundant, but the type of training will cover multiple scenarios.
I hope Im explaining it correctly.
thank you
Dan, perhaps it's easier to fill these simple matrices to explain desired result
(in attached file)
- PeterBartholomew1Apr 22, 2019Silver Contributor
Sorry, I didn't see this when I posted; I had been away from the computer.
- DanGreeneApr 22, 2019Copper Contributor
Hello,
Attached is my spread sheet. Hopefully this will help.
Im looking at using 6 logic formulas nested in cell E5 to process the value found I5 to route what formula to use to determine what value to place into E5. T, NT, OT.
=IF (G5="LOW" and H5="LOW"), THEN IF (I5="LOW", "T", IF(I5="HIGH", "T", "T")) ELSE
=IF (G5="LOW" and H5="HIGH") THEN IF (I5="LOW", "T", IF(I5=HIGH, "NT", "NT")) ELSE
=IF (G5="MODERATE" and H5=LOW) THEN (I5=LOW, "T", IF(I5="HIGH", "NT", "NT")) ELSE
=IF (G5="MODERATE" and H5="HIGH") THEN (I5="LOW", "OT", IF(I5="HIGH", "T", "OT")) ELSE
=IF (G5="HIGH" and H5="LOW") THEN (I5=LOW, "T", IF(I5=HIGH, "NT", "T")) ELSE
=IF (G5="HIGH" and H5="HIGH") THEN IF (I5="LOW", "OT", IF(I5="HIGH", "T", "OT"))
thank you