Results 1 to 3 of 3
  1. #1
    5 Star Lounger
    Join Date
    May 2003
    Location
    Sheffield, Yorkshire
    Posts
    951
    Thanks
    1
    Thanked 0 Times in 0 Posts

    IIF Statement (2003)

    Can you have an IIF formula within itself? What I want is that if [Part] begins with "1A", print statement 1. If the [Part] doesn't start with "F", print statement 2 else print nothing.

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

    Re: IIF Statement (2003)

    Yes, you can have nested IIfs:
    <code>
    =IIf(Left([Part],2) = "1A", "Statement 1", IIf(Left([Part], 1) <> "F", "Statement 2", ""))
    </code>
    (I assumed that the expression is to be used as the control source of a text box)

  3. #3
    5 Star Lounger
    Join Date
    May 2003
    Location
    Sheffield, Yorkshire
    Posts
    951
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: IIF Statement (2003)

    Yes it is. Thanks Hans

Posting Permissions

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