Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Using or condition in if statement

Hi All,

I wish to use an or condition in the if statement like:

if Value=3 or Value=4 or Value=5 then 'Y'

else 'N'.

How do I convert it into an if statement?

Thanks,

Asma

1 Solution

Accepted Solutions
Not applicable
Author

Hi Asma,

' If ' Function has 3 Parts

1- Conditon,

2- IF Condition Holds True

4. If Condition doesn't hold Trye / ELSE

Use can try in your case; ( Value considered as a Field name)

IF(Value='3' or Value='4' or Value='5', 'Y'', 'N')

Hope it helps.

Cheers !

View solution in original post

3 Replies
Not applicable
Author

Hi Asma,

' If ' Function has 3 Parts

1- Conditon,

2- IF Condition Holds True

4. If Condition doesn't hold Trye / ELSE

Use can try in your case; ( Value considered as a Field name)

IF(Value='3' or Value='4' or Value='5', 'Y'', 'N')

Hope it helps.

Cheers !

Not applicable
Author

I tried this. But it is not working

Not applicable
Author

I had done a small syntax error. It works now. Thanks