Skip to main content

IF [Age]>=1 and [Age]<=24 THEN 'Gen Z'

ELSEIF [Age] >=25 and [Age]<=40 THEN 'Gen Y'

ELSEIF [Age]>=41 and [Age]<=56 THEN 'Gen X'

ELSEIF [Age]>=57 and [Age]<=75 THEN 'Gen Boom'

ELSE [Age]>=76 THEN 'Gen Silent'

END

5 answers
  1. Jun 18, 2021, 8:44 AM

    Hi, you cannot have a condition in else. For writing a condition you need to use elseif. So you solution will be -

     

    IF [Age]>=1 and [Age]<=24 THEN 'Gen Z'

    ELSEIF [Age] >=25 and [Age]<=40 THEN 'Gen Y'

    ELSEIF [Age]>=41 and [Age]<=56 THEN 'Gen X'

    ELSEIF [Age]>=57 and [Age]<=75 THEN 'Gen Boom'

    ELSEIF [Age]>=76 THEN 'Gen Silent'

    END

0/9000