# Help with formula

• 0
• Question
• Updated 1 year ago
• In Progress
My requirements were the following:

Program = Residential

Measure = M&V and any of these:

M&V_allclean = No

TO_CalculatedCFMPerTon < 340

TO_CalculatedCFMPerTon > 460

If Equipment – MeteringDevice = TXV and TO_Subcooling > TO_SubcoolingTarget plus 5

If Equipment – MeteringDevice = TXV and TO_Subcooling < TO_SubcoolingTarget minus 5

If Equipment – MeteringDevice does not equal TXV and TO_Superheat > TO_TargetSuperHeat plus 5

If Equipment – MeteringDevice does not equal TXV and TO_Superheat < TO_TargetSuperHeat minus 5

Below is what I came up with and it's not working.

If([Customer - Program]="Residential" and
[Measure]="M&V" and
[M&V_allclean]=false and
[TO_CalculatedCFMPerTon]<340 and
[TO_CalculatedCFMPerTon]>460 and
[Equipment - MeteringDevice]="TXV" and ([TO_Subcooling]>[TO_SubcoolingTarget] + 5 or [TO_Subcooling]<[TO_SubcoolingTarget] - 5) and
[Equipment - MeteringDevice]<>"TXV" and ([TO_Superheat]>[TO_TargetSuperHeat] + 5 or [TO_Superheat]<[TO_TargetSuperHeat] - 5), "140")

Thanks for any assistance.
• 394 Points

Posted 1 year ago

• 0
• 334 Points

If( (condition 1) and (condition 2and (condition 3), true result, false result)
• 350 Points
Hi Stephen
If you make a formula numeric field, the formula editor will help you with the placement of parenthesis. If you write it out your conditions first like 'this AND this AND This OR This' it helps you make sense of all the fields involved:

If(
([Customer - Program]="Residential") and
([Measure]="M&V") and
([M&V_allclean]= "false")
and
([TO_CalculatedCFMPerTon]<340) or ([TO_CalculatedCFMPerTon]>460)
and
([Equipment - MeteringDevice]="TXV") and
([TO_Subcooling] > ([TO_SubcoolingTarget] + 5) or
([TO_Subcooling] < ([TO_SubcoolingTarget] - 5)))
or
([Equipment - MeteringDevice]<>"TXV" ) and
([TO_Superheat] > ([TO_TargetSuperHeat] + 5) or
([TO_Superheat] < ([TO_TargetSuperHeat] - 5))), 140)