Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Best way to write formula

Status
Not open for further replies.

cyreports

Programmer
May 12, 2010
89
US
What would be the best way to write this formula? It the SFFormOfDeclaration = "W-2" or "1099" then I want an "X" else nothing. Would I just want to use multiple IF THEN Statments or could I use a IN Statement??

Code:
IF {rpPatProfile.SFFormOfDeclaration} = "W-2" THEN "X"
 
Personally, I would write it as:
Code:
IF {rpPatProfile.SFFormOfDeclaration} = "W-2" or {rpPatProfile.SFFormOfDeclaration} = "1099" THEN "X"

I'm sure there's a way to do it using an IN statement, but this works just as well.

-Dell

A computer only does what you actually told it to do - not what you thought you told it to do.
 
As hilfy mentioned, here's the IN statement. Either works.

IF {rpPatProfile.SFFormOfDeclaration} IN ["W-2","1099"] then "X
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top