Hi. I have an if else statement that is like this:

``````ifelse(Group ='A', ifelse(\${A}= 'Yes', \${NewPoints}, {Points}), {Points})

``````

What I wanted to do is add another if else statement for Group B, C, D and E. But it is giving me errors whenever I try to combine them all. I think my formula is incorrect.

``````ifelse(Group ='A', ifelse(\${A}= 'Yes', \${NewPoints}, {Points}), {Points})
ifelse(Group ='B', ifelse(\${B}= 'Yes', \${NewPoints}, {Points}), {Points})
ifelse(Group ='C', ifelse(\${C}= 'Yes', \${NewPoints}, {Points}), {Points})
ifelse(Group ='D', ifelse(\${D}= 'Yes', \${NewPoints}, {Points}), {Points})
ifelse(Group ='E', ifelse(\${E}= 'Yes', \${NewPoints}, {Points}), {Points})
``````

How do I combine these into one nested statement?

The second image is not a valid expression since there is no function that combines values of individual ifelse expressions. BTW, you don’t have to nest ifelse expressions in this case. I would write it like this
ifelse(Group =‘A’ AND \${A}= ‘Yes’ OR Group =‘B’ AND \${B}= ‘Yes’ OR Group =‘C’ AND \${C}= ‘Yes’ OR Group =‘D’ AND \${D}= ‘Yes’ OR Group =''E" AND \${E}= ‘Yes’, \${NewPoints}, {Points})

1 Like

Thank you! I appreciate the help