Skip to main content
Announcements
Customer Spotlight: Discover what’s possible with embedded analytics Oct. 16 at 10:00 AM ET: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

IF function with multiple values

Hi

I have to write an IF condition like

=IF( (VAR=1 OR VAR=2 OR VAR=3 OR VAR=4 OR VAR=5 OR VAR=6) AND ( FOO=2 OR  FOO=3 OR  FOO=4 OR  FOO=5 OR  FOO=6),'A','B')

It works, but exist a quick way to write it? Something like

= IF( (VAR in (1,2,3,4,5,6)) AND (FOO in (2,3,4,5,6),'A','B')

Thanks

1 Solution

Accepted Solutions
rajni_batra
Specialist
Specialist

Strange check the Test App

View solution in original post

4 Replies
rajni_batra
Specialist
Specialist

you can use match function for this

match(VAR, 1,2,3,4,5).. and so on..

hope it helps!!!

Not applicable
Author

I try this

=IF(MATCH(VAR,1,2,3,4,5,6),'A','B')

but it does not works...

rajni_batra
Specialist
Specialist

Strange check the Test App

Not applicable
Author

Ok, now it work!

Thanks