Sep 30 2021 01:44 PM
I need help from someone who knows the answer to my question below.
I have this Nested IF Statement whereby I want to when needed, provide a separate answer if the statement is False. For instance, the statement in red below says: “This Is LHS” if the statement is TRUE however if FALSE I want it to say: “This Is Not LHS. Temp is below 85 degrees”. The thing is though, I want the rest of the Nested IF Statement to result as stated at the end of the Statement: “This Is Not LHS”.
Can I present separate messages within the statement if the result of the IF Statement is False and could someone modify or help me with my statement to show me how to properly construct the IF Statement?
=IF(AND(AND(E8="Appliance",F8="Oven/Range",J8="NW")),"This Is LHS"IF(AND(AND(E8="HVAC",F8="AC",J8>85)),"This Is LHS",IF(AND(AND(E8="Appliance",F8="Dishwasher",J8="NW")),"This Is LHS",IF(AND(E8="Environmental",F8="Mold"),"This Is LHS",IF(AND(E8="Electrical",F8="No Power"),"This Is LHS",IF(AND(AND(E8="Electrical",F8="Lights",J8="NP")),"This Is LHS","This Is Not LHS"))))))
Below is what I am trying to accomplish but I cannot seem to get the Construct correct. HELP!!!
=IF(AND(AND(E8="Appliance",F8="Oven/Range",J8="NW")),"This Is LHS",IF(AND(AND(E8="HVAC",F8="AC",J8>85)),"This Is LHS. Temp Is above 85 degrees",”This Is Not LHS. Temp is Below 85 degrees”,IF(AND(AND(E8="Appliance",F8="Dishwasher",J8="NW")),"This Is LHS",IF(AND(E8="Environmental",F8="Mold"),"This Is LHS",IF(AND(E8="Electrical",F8="No Power"),"This Is LHS",IF(AND(AND(E8="Electrical",F8="Lights",J8="NP")),"This Is LHS","This Is Not LHS"))))))
Thank you,
Carl
Oct 07 2021 06:35 AM
Oct 08 2021 08:07 PM
Oct 13 2021 01:25 PM
Oct 13 2021 01:36 PM
Oct 13 2021 02:00 PM
No I don't have anymore questions. I'm in the process of doing a ven diagram for the F Column based on the values if the J Column. Maybe you can help so it will also keep you busy thinkin and not get irate because its taking time?
In the truth table, Appliance which of the items in the 2nd column can I and with the 3rd column because the third column has exactly the same items exactly, and if the items in the third column has some similar items but not exactly then the 2nd column have to be anded with another item in the 2nd column 2x because some of the the third items are similar but not all. Do you follow? Don't get confused thinkin about it.
Appliance | Dehumidifier | No Power |
Leaking | ||
Noisy | ||
Broken | ||
Dishwasher | No Power | |
Leaking | ||
Noisy | ||
Broken | ||
Not Heating | ||
Water Heater | No Power | |
Leaking | ||
Noisy | ||
Broken | ||
Not Heating | ||
Gas Leak | ||
Gas Smell | ||
Oven/Range | No Power | |
Broken | ||
Not Heating | ||
Gas Leak | ||
Gas Smell |
Oct 13 2021 02:06 PM - edited Oct 13 2021 02:07 PM
That's the easy part, the more complex part is which arrangement will be optimal to the formula, where there is less repetition of the nested OR(AND()) nest or should it be the AND(OR()) nest for each item that has some similar items and different items to and with then or with. Do you follow?
Oct 13 2021 02:26 PM - edited Oct 13 2021 02:42 PM
So in a nutshell, which is more efficient to the formula to have an AND() then an OR(0 nested, and which items would be more efficient to the formula to have an OR() then an AND() nested.
In other words which nest should I use for items in the 2nd column where there is less repetition.
for example:
AND(F2="Dehumidifier", F2="Dishwasher"),OR(J2="No Power",J2="Leaking",J2="Noisy", J2="Broken"))
well "Dehumidifier" does not have "Not Heating", so I have to repeat ORing the "Dehumidifier" "Dishwasher" with "Water Heater" and "Oven/Range" because there is that "Not Heating" in "Dishwasher" that is not in "Dehumidifier" but is in "Water Heater", and "Oven/Range" so that:
AND(F2="Dishwasher",F2="Water Heater", F2="Oven/Range"), OR(J2="No Power", J2="Leaking", J2="Noisy", J2="Broken"))
So in this example "Dishwasher is ANDed with "Dehumidifier" (first instance) as well as "Water Heater" and "Oven/Range" (second instance). Don't get confused thinkin about it. As you can see in the above explanation I already got confused trying to illustrate to you the example.. so I have to be careful about it because the "Safety Implications" to the residents and to your job will be at stake! How many mistakes did I commit trying to explain the scenario to you? Five. Do you follow?
Oct 13 2021 07:06 PM - edited Oct 13 2021 07:12 PM
Here's your formula:
=IF(
OR(
AND(E2="HVAC",F2="AC",J2>85),
AND(E2="HVAC",OR(
F2="AC",
F2="Dehumidifier"
),
OR(
J2="No Power",
J2="Leaking",
J2="Noisy",
J2="Broken"
),
),
AND(E2="Appliance",OR(
F2="Dehumidifier",
F2="Dishwasher",
F2="Water Heater"
),
OR(
J2="No Power",
J2="Leaking",
J2="Noisy",
J2="Broken"
)
),
AND(E2="Appliance",OR(
F2="Dishwasher",
F2="Water Heater",
F2="Oven/Range"
),
J2="Not Heating"
),
AND(E2="Appliance",OR(
F2="Water Heater",
F2="Oven/Range"
),
OR(
J2="Gas Leak",
J2="Gas Smell"
)
),
AND(E2="Electrical",F2="Lights",
OR(
J2="No Power",
J2="Broken"
)
),
AND(E2="Environmental",F2="Mold",
OR(
J2="Present",
J2="Visible"
)
),
AND(E2="Plumbing",OR(
F2="Drain",
F2="Pipes",
),
OR(
J2="Leaking",
J2="Smell",
J2="Clogged",
J2="Noisy",
J2="Broken"
)
),
AND(E2="Structural",F2="Ceiling",
OR(
J2="Leaking",
J2="Broken"
)
),
AND(E2="Structural",F2="Mold",
OR(
J2="Present",
J2="Visible"
)
)
),
"LHS",
"NOT LHS"
)
cheers
Oct 13 2021 07:40 PM
Oct 14 2021 11:08 AM
Oct 14 2021 12:32 PM
Oct 14 2021 12:47 PM
SolutionYour Final Formula:
IFERROR(
IF(
OR(
AND(E2="HVAC",F2="AC",J2>85),
AND(E2="HVAC",OR(
F2="AC",
F2="Dehumidifier"
),
OR(
J2="No Power",
J2="Leaking",
J2="Noisy",
J2="Broken"
),
),
AND(E2="Appliance",OR(
F2="Dehumidifier",
F2="Dishwasher",
F2="Water Heater"
),
OR(
J2="No Power",
J2="Leaking",
J2="Noisy",
J2="Broken"
)
),
AND(E2="Appliance",OR(
F2="Dishwasher",
F2="Water Heater",
F2="Oven/Range"
),
J2="Not Heating"
),
AND(E2="Appliance",OR(
F2="Water Heater",
F2="Oven/Range"
),
OR(
J2="Gas Leak",
J2="Gas Smell"
)
),
AND(E2="Electrical",F2="Lights",OR(
J2="No Power",
J2="Broken"
)
),
AND(E2="Environmental",F2="Mold",OR(
J2="Present",
J2="Visible"
)
),
AND(E2="Plumbing",OR(
F2="Drain",
F2="Pipes",
),
OR(
J2="Leaking",
J2="Smell",
J2="Clogged",
J2="Noisy",
J2="Broken"
)
),
AND(E2="Structural",F2="Ceiling",OR(
J2="Leaking",
J2="Broken"
)
),
AND(E2="Structural",F2="Mold",OR(
J2="Present",
J2="Visible"
)
)
),
IFS(AND(E2="HVAC",F2="AC",AND(ISNUMBER(J2),J2>85)),
"LHS Temp is 86 and above",
AND(E2="HVAC",F2="AC",J2<=85),
"This is Not LHS Temp is 85 and below ",
AND(E2<>"HVAC",F2<>"AC",NOT(ISNUMBER(J2))),"LHS"
),
IFS(AND(E2="HVAC",F2="AC",J2>85),
"LHS Temp is 86 and above",
AND(E2="HVAC",F2="AC",J2<=85),
"This is Not LHS Temp is 85 and below ",
AND(E2<>"HVAC",F2<>"AC",NOT(ISNUMBER(J2))),"NOT LHS"
)
),
"")
cheers
Oct 18 2021 08:21 AM