If-statement query

Started by Andrew Carrick, August 05, 2011, 06:51:10 AM

Previous topic - Next topic

0 Members and 3 Guests are viewing this topic.

Andrew Carrick

Is it posible to have an OR query in an If Statement? We have 2 policy types where we need some text to appear in letters. Instead of having 2 "Ifs" can I have just one that says "If policy type = XXXX or if policy type = YYYY then insert text"?
Jelf Insurance Partnership
Hull, East Yorkshire, UK
Me and TAM used to have a thing but we've split amicably. She got the kids, I got the Camaro and the maid.

Matthew Udovich

Top of the morning to you Andrew!
I'm no expert, but in situations like these, I have always had to use nested if statements.

Andrew Carrick

Good afternoon to you Matthew! (just gone 1pm here  :) )

Thanks, that's definitely an option, as is copying and pasting the original if stament then edting the second one. I was just curious as to whether we could do more, I might give it a try and report back unless anyone else knows?
Jelf Insurance Partnership
Hull, East Yorkshire, UK
Me and TAM used to have a thing but we've split amicably. She got the kids, I got the Camaro and the maid.

Matthew Udovich

It's Friday, the rest of the group must have had too much fun on Thirsty Thursday :-) They'll come around once the Folgers kicks in ;D

Steven Strauss

Are you trying to do this in TAM or in Excel?
Steven Strauss - CFO
NIP Group, Inc.  Woodbridge, NJ
Epic 2022 R2
CSR24, Salesforce, Cognos Finance, TM1

Todd Arnold

If it's possible to use any of the things I learned from conjunction junction inside of a Word If statement, I've never managed to figure it out.  But as Matthew pointed out, nesting a second IF inside of the return if false area of the first will achieve the same effect - it's just longer and harder to look at.  So something along the lines of:
{ IF "<Type>" = "XXXX" "It's one of the policy types!" "{ IF "<Type>" = "YYYY" "Its one of the policy types!" "Its neither of the policy types" }" }
Todd Arnold
AB Solutions, Inc.
800-753-7785 x111

Orlando Alonzo

If there are only 2 choices wouldn't you just include the true and false results in your IF statement without having to nest multiple if's?  {IF "TYPE" = "XXX" "Pol type is XXX" "Pol type is YYY"}
Orlando F. Alonzo III
RPM Insurance Agency • Staten Island, NY • oalonzo@rpminsurance.com

Andrew Carrick

Steven, this is for TAM. Orlando, the either-or would work if there were only two options but I have either 1 or 2 or others.
Jelf Insurance Partnership
Hull, East Yorkshire, UK
Me and TAM used to have a thing but we've split amicably. She got the kids, I got the Camaro and the maid.

Orlando Alonzo

Then in that case the nested if will be your best.
Orlando F. Alonzo III
RPM Insurance Agency • Staten Island, NY • oalonzo@rpminsurance.com

Andrew Carrick

Jelf Insurance Partnership
Hull, East Yorkshire, UK
Me and TAM used to have a thing but we've split amicably. She got the kids, I got the Camaro and the maid.