IIF Statement

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Please advise how best to do this using simplest syntax with the end
goal/result that shows: IF [MEMBER_TYPE] = S2x or S2TX or S2T or S2 AND
[WRITING_EXAMS] = 1, THEN "Yes", ELSE "No or Not applicable". Even better,
if we can also include in the same IIF statement IF [WRITING_EXAMS] = Null,
THEN "No".

Current syntax that needs to be modified:
=IIf([MEMBER_TYPE]="S2X",[WRITING_EXAMS],IIf([MEMBER_TYPE]="S2TX",[WRITING_EXAMS],IIf([MEMBER_TYPE]="S2T",[WRITING_EXAMS],IIf([MEMBER_TYPE]="S2",[WRITING_EXAMS],"Not Applicable"))))

Many thanks,
a
 
Please advise how best to do this using simplest syntax with the end
goal/result that shows: IF [MEMBER_TYPE] = S2x or S2TX or S2T or S2 AND
[WRITING_EXAMS] = 1, THEN "Yes", ELSE "No or Not applicable". Even better,
if we can also include in the same IIF statement IF [WRITING_EXAMS] = Null,
THEN "No".

Current syntax that needs to be modified:
=IIf([MEMBER_TYPE]="S2X",[WRITING_EXAMS],IIf([MEMBER_TYPE]="S2TX",[WRITING_EXAMS],IIf([MEMBER_TYPE]="S2T",[WRITING_EXAMS],IIf([MEMBER_TYPE]="S2",[WRITING_EXAMS],"Not Applicable"))))

Many thanks,
a
I think this will work, but you'll need to test:
= IIF(InStr(1,"S2XS2TX",[MEMBER_TYPE])<>0 And [WRITING_EXAMS]=1,
"Yes","No or Not Applicable")


Cheers
Chris
 
If [Member_Type] need only start with S2...
(LIKE may need to be '=', not sure)

=IIF([Member_Type] LIKE "S2*",IIF(Nz([Writing_Exams],0)=1,"Yes","No or
Not applicable"),"No or Not applicable")
 
Works like a charm. Thanks Chris!


ChrisHulan said:
Please advise how best to do this using simplest syntax with the end
goal/result that shows: IF [MEMBER_TYPE] = S2x or S2TX or S2T or S2 AND
[WRITING_EXAMS] = 1, THEN "Yes", ELSE "No or Not applicable". Even better,
if we can also include in the same IIF statement IF [WRITING_EXAMS] = Null,
THEN "No".

Current syntax that needs to be modified:
=IIf([MEMBER_TYPE]="S2X",[WRITING_EXAMS],IIf([MEMBER_TYPE]="S2TX",[WRITING_EXAMS],IIf([MEMBER_TYPE]="S2T",[WRITING_EXAMS],IIf([MEMBER_TYPE]="S2",[WRITING_EXAMS],"Not Applicable"))))

Many thanks,
a
I think this will work, but you'll need to test:
= IIF(InStr(1,"S2XS2TX",[MEMBER_TYPE])<>0 And [WRITING_EXAMS]=1,
"Yes","No or Not Applicable")


Cheers
Chris
 
Back
Top