Revit MEP Forum
Welcome to Autodesk’s Revit MEP Forums. Share your knowledge, ask questions, and explore popular Revit MEP topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

IF AND formulas not working

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
Anonymous
647 Views, 3 Replies

IF AND formulas not working

Autodesk,

 

I have created an IF/AND formula with 3 "AND"s. I get an "improper use of boolean expressions" error. But I noticed it works with 2 "AND"s. Is 2 my limit? Or is there a work around to add more than 2? I tried the "3 AND" formula in Excel and it worked like a charm.

 

Here is my formula that does not work (3 ANDs): "if(and(Phase Multiplier = 1, FAN VOLT = 120 V, FAN HP=1), 16 A, 0 A)"

 

Here is my formula that does work (2 ANDs): "if(and(Phase Multiplier = 1, FAN VOLT = 120 V), 16 A, 0 A)"

 

Get your best programmer on this!!!!!

 

 

Thanks!

 

3 REPLIES 3
Message 2 of 4
Chris.Aquino
in reply to: Anonymous

At this time it looks like AND conditional statements are meant for 2 True statements. If you wan to have more than 2, I would look at using nested IF Conditional Statements.

 

The following section from the Help has more information:

 

Conditional Statements



Chris Aquino
Adoption Marketing Manager | BIM Collaborate Pro
@Aquinotecture

Message 3 of 4
CoreyDaun
in reply to: Anonymous

You CAN have more than one condition for the AND function, I've been using that for quite a long time. I think the error may lie with "FAN HP". Try using this formula to see if you can isolate the error:

 

if(and(FAN VOLT = 120 V, FAN HP = 1), 16 A, 0 A)

 

If that doesn't get an error, maybe you can post the family so we can take a look? If not, this formula should work.

 

if(and(Phase Multiplier = 1, and(FAN VOLT = 120 V, FAN HP = 1)), 16 A, 0 A)

Corey D.                                                                                                                  ADSK_Logo_EE_2013.png    AutoCAD 2014 User  Revit 2014 User
──────────────────────────────────────────────────────────────────────
⁞|⁞ Please use Mark Solutions!.Accept as Solution and Give Kudos!Give Kudos as appropriate to further enhance these forums. Thank you!
Message 4 of 4
Anonymous
in reply to: CoreyDaun

Nice work,

 

FAN HP was indeed the culprit. It was the fact that FAN HP was a text parameter, rather than a numeric parameter. Once that was changed, it worked!

 

Thanks!

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report


Autodesk Design & Make Report