Forum Discussion
Anonymous
3 years agoNot applicable
Facing issues with the IF statement
Hi All, Below is the table and the following formula is used in excel. The logic is straightforward in excel. I am trying to find the Gender based on values present in column A and B. Formula -...
- 3 years ago
Hi Anonymous ,
try
if [FEMALE_AGE_RANGE] = [MALE_AGE_RANGE] then "No Data" else if [FEMALE_AGE_RANGE] = null then "Male" else "Female"
mussaenda
3 years agoCommunity Champion
Hi Anonymous ,
try
if [FEMALE_AGE_RANGE] = [MALE_AGE_RANGE]
then "No Data"
else
if [FEMALE_AGE_RANGE] = null
then "Male"
else
"Female"Anonymous
3 years agoNot applicable
Hi mussaenda
Thanks for this. It worked so the only difference between your query and my query is that extra space between "else" and "if" ๐ ? and how did you find out about this issue? I did not even think in your direction at all. Thanks again
- mussaenda3 years agoCommunity Champion
Hi Anonymous ,
Glad it worked. It is still your query.
The difference is the null that you treated as a string because of ""
It should be null and not "null"
- Anonymous3 years agoNot applicable
Thanks mate. Clear ๐