Results 1 to 2 of 2
  1. #1
    2 Star Lounger
    Join Date
    Feb 2003
    Posts
    129
    Thanks
    0
    Thanked 0 Times in 0 Posts

    IIF function variation (2002/SP2)

    Somewhere I read that there is a function that works similar to IIF but gives you more that two options. I can't find it now. I want to have the function close between yes and no and then if the answer is "no" do one of two things depending on another variable.
    Anyone know what function I'm talking about?

    Thanks

    Paul

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: IIF function variation (2002/SP2)

    From your description, I would guess that you need nested IIf's. The Switch function can be used if you want to handle more than a True/False decision:

    =Switch([City]="London", "UK", [City]="Paris", "France", [City]="Berlin", "Germany", [City]="Madrid", "Spain")

    But in your case it would probably be something like this:

    =IIf([Age]>18, "Adult", IIf([Gender]="M", "Boy", "Girl"))

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •