Switch(
(age>15)+(age>18)+(age>31)+(age>45)
,0,‘kids’
,1,‘teenagers’
,2,‘young’
,3,‘mature’
,4,‘older’
)
Switch(
(age>15)+(age>18)+(age>31)+(age>45)
,0,‘kids’
,1,‘teenagers’
,2,‘young’
,3,‘mature’
,4,‘older’
)
Thanks Alexey.
I’m getting an error. Maybe am I missing something?

Thanks Alexey.
I’m getting an error. Maybe am I missing something?

i think, it’s quotes, the forum substituted usual symmetric single quote
by left/right quotes…
my fault, i should have select formula text to avoid it.
correct version (substitute only lower part, with quotes)
Switch(
(age>15)+(age>18)+(age>31)+(age>45)
,0,'kids'
,1,'teenagers'
,2,'young'
,3,'mature'
,4,'older'
)
i think, it’s quotes, the forum substituted usual symmetric single quote
by left/right quotes…
my fault, i should have select formula text to avoid it.
correct version (substitute only lower part, with quotes)
Switch(
(age>15)+(age>18)+(age>31)+(age>45)
,0,'kids'
,1,'teenagers'
,2,'young'
,3,'mature'
,4,'older'
)
I see! Thanks so much. It works like a charm!