Nested IIf

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

Guest

I have this expression which works well in generating Committee Member
tenure/histories:

=IIf([EXPR4]=2222,[Description] & ", " & [TITLE] & "," & Left([EXPR2],5) & "
- " & "present", [Description] & ", " & [TITLE] & "," & Left([EXPR2],5) & "
-" & [EXPR4])

That said; however, I now need to add the following condition. Any ideas how
best to incorporate the below in its simplest form please...before my brain
starts to fry? Too many conditions, so little time...

IIf [EXPR3]=[EXPR2], [DESCRIPTION] & "," & [TITLE], & "," & LEFT
([EXPR2],5), [DESCRIPTION] & "," & [TITLE] & "," LEFT ([EXPR2],5) & "-" &
[EXPR4]

If it helps, here's the detailed syntax:

[EXPR2] = RIGHT([EFFECTIVE_DATE],13)
[EXPR3] = RIGHT ([THRU_DATE], 13)
[EXPR4] = LEFT ([EXPR3],5)

Many thanks,
a
 
Try

=IIf([EXPR4]=2222,[Description] & ", " & [TITLE] & "," & Left([EXPR2],5) & "
- " & "present", IIf([EXPR3]=[EXPR2], [DESCRIPTION] & "," & [TITLE] & "," &
LEFT([EXPR2],5),[Description] & ", " & [TITLE] & "," & Left([EXPR2],5) & "-"
& [EXPR4]))
 
Thanks for this Ofer. It works wonderfully! You are awesome!

God bless,
a

Ofer Cohen said:
Try

=IIf([EXPR4]=2222,[Description] & ", " & [TITLE] & "," & Left([EXPR2],5) & "
- " & "present", IIf([EXPR3]=[EXPR2], [DESCRIPTION] & "," & [TITLE] & "," &
LEFT([EXPR2],5),[Description] & ", " & [TITLE] & "," & Left([EXPR2],5) & "-"
& [EXPR4]))

--
Good Luck
BS"D


Angelita Guevara said:
I have this expression which works well in generating Committee Member
tenure/histories:

=IIf([EXPR4]=2222,[Description] & ", " & [TITLE] & "," & Left([EXPR2],5) & "
- " & "present", [Description] & ", " & [TITLE] & "," & Left([EXPR2],5) & "
-" & [EXPR4])

That said; however, I now need to add the following condition. Any ideas how
best to incorporate the below in its simplest form please...before my brain
starts to fry? Too many conditions, so little time...

IIf [EXPR3]=[EXPR2], [DESCRIPTION] & "," & [TITLE], & "," & LEFT
([EXPR2],5), [DESCRIPTION] & "," & [TITLE] & "," LEFT ([EXPR2],5) & "-" &
[EXPR4]

If it helps, here's the detailed syntax:

[EXPR2] = RIGHT([EFFECTIVE_DATE],13)
[EXPR3] = RIGHT ([THRU_DATE], 13)
[EXPR4] = LEFT ([EXPR3],5)

Many thanks,
a
 
Back
Top